<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for cphplib_formular.inc</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file cphplib_formular.inc</h1>
<p>Documentation is available at <a href="../cphplib/_cphplib_formular_inc.html">cphplib_formular.inc</a></p>
<div class="src-code">
<pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc"> * Formular extention for cphplib</span></li>
<li><a name="a4"></a><span class="src-doc"> *</span></li>
<li><a name="a5"></a><span class="src-doc"> * PHP versions 4 and 5</span></li>
<li><a name="a6"></a><span class="src-doc"> *</span></li>
<li><a name="a7"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@category</span><span class="src-doc">    Utilities</span></li>
<li><a name="a8"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc">        cphplib</span></li>
<li><a name="a9"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc">        Alexander Meindl &lt;am@meindlsoft.com&gt;</span></li>
<li><a name="a10"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc">    (c) 2005 meindlSOFT</span></li>
<li><a name="a11"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc">        Released under v2 of the GNU LGPL</span></li>
<li><a name="a12"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc">        CVS: $Id: cphplib_formular.inc,v 1.10 2005/10/21 06:27:54 alex Exp $</span></li>
<li><a name="a13"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@link</span><span class="src-doc">        http://www.meindlsoft.com/tools.php</span></li>
<li><a name="a14"></a><span class="src-doc"> */</span></li>
<li><a name="a15"></a>&nbsp;</li>
<li><a name="a16"></a><span class="src-doc">/**</span></li>
<li><a name="a17"></a><span class="src-doc"> * cphplib formular extention</span></li>
<li><a name="a18"></a><span class="src-doc"> */</span></li>
<li><a name="a19"></a><span class="src-key">class </span><a href="../cphplib/cphplib_formular.html">cphplib_formular</a> <span class="src-key">extends </span><a href="../cphplib/cphplib.html#methodcphplib">cphplib</a></li>
<li><a name="a20"></a><span class="src-sym">{</span></li>
<li><a name="a21"></a>    <span class="src-doc">/**</span></li>
<li><a name="a22"></a><span class="src-doc">     * Show error messages with class</span></li>
<li><a name="a23"></a><span class="src-doc">     *</span></li>
<li><a name="a24"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   true:    show error fields with class</span></li>
<li><a name="a25"></a><span class="src-doc">     *                 false:    show non-error fields with class</span></li>
<li><a name="a26"></a><span class="src-doc">     */</span></li>
<li><a name="a27"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$err_mode">$err_mode</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a28"></a>&nbsp;</li>
<li><a name="a29"></a>    <span class="src-doc">/**</span></li>
<li><a name="a30"></a><span class="src-doc">     * Formular error messages</span></li>
<li><a name="a31"></a><span class="src-doc">     *</span></li>
<li><a name="a32"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></li>
<li><a name="a33"></a><span class="src-doc">     */</span></li>
<li><a name="a34"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$form_errors">$form_errors</a><span class="src-sym">;</span></li>
<li><a name="a35"></a>&nbsp;</li>
<li><a name="a36"></a>    <span class="src-doc">/**</span></li>
<li><a name="a37"></a><span class="src-doc">     * Current client operating system</span></li>
<li><a name="a38"></a><span class="src-doc">     *</span></li>
<li><a name="a39"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">char </span></li>
<li><a name="a40"></a><span class="src-doc">     */</span></li>
<li><a name="a41"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$os_type">$os_type</a><span class="src-sym">;</span></li>
<li><a name="a42"></a>&nbsp;</li>
<li><a name="a43"></a>    <span class="src-doc">/**</span></li>
<li><a name="a44"></a><span class="src-doc">     * Current browser type</span></li>
<li><a name="a45"></a><span class="src-doc">     *</span></li>
<li><a name="a46"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">char </span></li>
<li><a name="a47"></a><span class="src-doc">     */</span></li>
<li><a name="a48"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$browser_type">$browser_type</a><span class="src-sym">;</span></li>
<li><a name="a49"></a>&nbsp;</li>
<li><a name="a50"></a>    <span class="src-doc">/**</span></li>
<li><a name="a51"></a><span class="src-doc">     * Set name parameter of formular object</span></li>
<li><a name="a52"></a><span class="src-doc">     *</span></li>
<li><a name="a53"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">bool </span></li>
<li><a name="a54"></a><span class="src-doc">     */</span></li>
<li><a name="a55"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$set_formular_name">$set_formular_name</a> = <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a56"></a>&nbsp;</li>
<li><a name="a57"></a>    <span class="src-doc">/**</span></li>
<li><a name="a58"></a><span class="src-doc">     * Set id parameter of formular object</span></li>
<li><a name="a59"></a><span class="src-doc">     *</span></li>
<li><a name="a60"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">bool </span></li>
<li><a name="a61"></a><span class="src-doc">     */</span></li>
<li><a name="a62"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$set_formular_id">$set_formular_id</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a63"></a>&nbsp;</li>
<li><a name="a64"></a>    <span class="src-doc">/**</span></li>
<li><a name="a65"></a><span class="src-doc">     * Current formular name</span></li>
<li><a name="a66"></a><span class="src-doc">     *</span></li>
<li><a name="a67"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a68"></a><span class="src-doc">     */</span></li>
<li><a name="a69"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$formular_name">$formular_name</a><span class="src-sym">;</span></li>
<li><a name="a70"></a>&nbsp;</li>
<li><a name="a71"></a>    <span class="src-doc">/**</span></li>
<li><a name="a72"></a><span class="src-doc">     * CSS class for buttons in formular</span></li>
<li><a name="a73"></a><span class="src-doc">     *</span></li>
<li><a name="a74"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a75"></a><span class="src-doc">     */</span></li>
<li><a name="a76"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$class_button">$class_button</a>    = <span class="src-str">&quot;button&quot;</span><span class="src-sym">;</span></li>
<li><a name="a77"></a>&nbsp;</li>
<li><a name="a78"></a>    <span class="src-doc">/**</span></li>
<li><a name="a79"></a><span class="src-doc">     * CSS class for buttons in formular (for error displaying)</span></li>
<li><a name="a80"></a><span class="src-doc">     *</span></li>
<li><a name="a81"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a82"></a><span class="src-doc">     */</span></li>
<li><a name="a83"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$class_shadow">$class_shadow</a>        = <span class="src-str">&quot;shadow&quot;</span><span class="src-sym">;</span></li>
<li><a name="a84"></a>&nbsp;</li>
<li><a name="a85"></a>    <span class="src-doc">/**</span></li>
<li><a name="a86"></a><span class="src-doc">     * CSS class for valid input fileds (non-error displaying)</span></li>
<li><a name="a87"></a><span class="src-doc">     *</span></li>
<li><a name="a88"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a89"></a><span class="src-doc">     */</span></li>
<li><a name="a90"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$class_non_error">$class_non_error</a>    = <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a91"></a>&nbsp;</li>
<li><a name="a92"></a>    <span class="src-doc">/**</span></li>
<li><a name="a93"></a><span class="src-doc">     * CSS class for error messages (HEADER)</span></li>
<li><a name="a94"></a><span class="src-doc">     *</span></li>
<li><a name="a95"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a96"></a><span class="src-doc">     */</span></li>
<li><a name="a97"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$class_error_header">$class_error_header</a>    = <span class="src-str">&quot;err_header&quot;</span><span class="src-sym">;</span></li>
<li><a name="a98"></a>&nbsp;</li>
<li><a name="a99"></a>    <span class="src-doc">/**</span></li>
<li><a name="a100"></a><span class="src-doc">     * CSS class for error messages (BODY)</span></li>
<li><a name="a101"></a><span class="src-doc">     *</span></li>
<li><a name="a102"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a103"></a><span class="src-doc">     */</span></li>
<li><a name="a104"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$class_error_body">$class_error_body</a>    = <span class="src-str">&quot;err&quot;</span><span class="src-sym">;</span></li>
<li><a name="a105"></a>&nbsp;</li>
<li><a name="a106"></a>    <span class="src-doc">/**</span></li>
<li><a name="a107"></a><span class="src-doc">     * Default date view mode:    M = month</span></li>
<li><a name="a108"></a><span class="src-doc">     *                            Q = quarter</span></li>
<li><a name="a109"></a><span class="src-doc">     *                            Y = year</span></li>
<li><a name="a110"></a><span class="src-doc">     *</span></li>
<li><a name="a111"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a112"></a><span class="src-doc">     */</span></li>
<li><a name="a113"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$default_date_period">$default_date_period</a>    = <span class="src-str">&quot;M&quot;</span><span class="src-sym">;</span></li>
<li><a name="a114"></a>&nbsp;</li>
<li><a name="a115"></a>    <span class="src-doc">/**</span></li>
<li><a name="a116"></a><span class="src-doc">     * First year in date select box</span></li>
<li><a name="a117"></a><span class="src-doc">     *</span></li>
<li><a name="a118"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">int </span></li>
<li><a name="a119"></a><span class="src-doc">     */</span></li>
<li><a name="a120"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$first_date_year">$first_date_year</a>        = <span class="src-num">1970</span><span class="src-sym">;</span></li>
<li><a name="a121"></a>&nbsp;</li>
<li><a name="a122"></a>    <span class="src-doc">/**</span></li>
<li><a name="a123"></a><span class="src-doc">     * Color for error displaying (only used for opera!)</span></li>
<li><a name="a124"></a><span class="src-doc">     *</span></li>
<li><a name="a125"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@deprecated</span></li>
<li><a name="a126"></a><span class="src-doc">     *</span></li>
<li><a name="a127"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@var </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a128"></a><span class="src-doc">     */</span></li>
<li><a name="a129"></a>    <span class="src-key">var </span><a href="../cphplib/cphplib_formular.html#var$error_color">$error_color</a>    = <span class="src-str">&quot;grey&quot;</span><span class="src-sym">;    </span><span class="src-comm">//    $STYLE['form2_bordercolor'];</span></li>
<li><a name="a130"></a>&nbsp;</li>
<li><a name="a129"></a>    </li>
<li><a name="a130"></a>&nbsp;</li>
<li><a name="a131"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodcphplib_formular">cphplib_formular</a><span class="src-sym">(</span><span class="src-var">$locale</span>=<span class="src-str">&quot;de_DE&quot;</span><span class="src-sym">)</span></li>
<li><a name="a132"></a>    <span class="src-sym">{</span></li>
<li><a name="a133"></a>        <span class="src-id">parent</span><span class="src-sym">::</span><a href="../cphplib/cphplib.html#methodcphplib">cphplib</a><span class="src-sym">(</span><span class="src-var">$locale</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a134"></a>&nbsp;</li>
<li><a name="a135"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$os_type">os_type</a>      = <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodos_type">os_type</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a136"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>    = <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodbrowser_type">browser_type</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a137"></a>    <span class="src-sym">}</span></li>
<li><a name="a138"></a>&nbsp;</li>
<li><a name="a139"></a>    <span class="src-doc">/**</span></li>
<li><a name="a140"></a><span class="src-doc">     * begining for formular</span></li>
<li><a name="a141"></a><span class="src-doc">     * (this function can only handle the session_id, if dbsession_start has</span></li>
<li><a name="a142"></a><span class="src-doc">     * been called immediately after creating the class object)</span></li>
<li><a name="a143"></a><span class="src-doc">     *</span></li>
<li><a name="a144"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$action </span><span class="src-doc">       action                    {default: PHP_SELF}</span></li>
<li><a name="a145"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">       name for formular        {default: void}</span></li>
<li><a name="a146"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$method </span><span class="src-doc">       post or get                {default: post}</span></li>
<li><a name="a147"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   </span><span class="src-doc-var">$mode </span><span class="src-doc">       false: no session_id, true: with session_id if required {default: true}</span></li>
<li><a name="a148"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span><span class="src-doc">   for addon parameters like enctype</span></li>
<li><a name="a149"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span><span class="src-doc">               formular head</span></li>
<li><a name="a150"></a><span class="src-doc">     */</span></li>
<li><a name="a151"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_start">fm_start</a><span class="src-sym">(</span><span class="src-var">$action</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$name</span>=<span class="src-str">&quot;form1&quot;</span><span class="src-sym">, </span><span class="src-var">$method</span>=<span class="src-str">&quot;post&quot;</span><span class="src-sym">, </span><span class="src-var">$mode</span>=<span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a152"></a>    <span class="src-sym">{</span></li>
<li><a name="a153"></a>        <span class="src-var">$with_hidden </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a154"></a>&nbsp;</li>
<li><a name="a155"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$mode</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$m_dbsession_handler">m_dbsession_handler</a><span class="src-sym">))</span></li>
<li><a name="a156"></a>        <span class="src-sym">{</span></li>
<li><a name="a157"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$m_dbsession_cookies">m_dbsession_cookies</a><span class="src-sym">)</span></li>
<li><a name="a158"></a>                <span class="src-var">$with_hidden </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a159"></a>        <span class="src-sym">}</span></li>
<li><a name="a160"></a>&nbsp;</li>
<li><a name="a161"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$action</span><span class="src-sym">))    </span><span class="src-var">$action </span>= <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'PHP_SELF'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a162"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$method</span><span class="src-sym">))    </span><span class="src-var">$method </span>= <span class="src-str">&quot;post&quot;</span><span class="src-sym">;</span></li>
<li><a name="a163"></a>&nbsp;</li>
<li><a name="a164"></a>        <span class="src-var">$rc  </span>= <span class="src-str">&quot;&lt;form action=\&quot;&quot;</span>.<span class="src-var">$action</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a165"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))</span></li>
<li><a name="a166"></a>        <span class="src-sym">{</span></li>
<li><a name="a167"></a>            <span class="src-comm">// save name for other objects</span></li>
<li><a name="a168"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$formular_name">formular_name</a> = <span class="src-var">$name</span><span class="src-sym">;</span></li>
<li><a name="a169"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$set_formular_name">set_formular_name</a><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; name=\&quot;&quot;</span>.<span class="src-var">$name</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a170"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$set_formular_id">set_formular_id</a><span class="src-sym">)        </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; id=\&quot;&quot;</span>.<span class="src-var">$name</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a171"></a>        <span class="src-sym">}</span></li>
<li><a name="a172"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot; method=\&quot;&quot;</span>.<span class="src-var">$method</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a173"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$customize</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a174"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a175"></a>&nbsp;</li>
<li><a name="a176"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$with_hidden</span><span class="src-sym">)</span></li>
<li><a name="a177"></a>        <span class="src-sym">{</span></li>
<li><a name="a178"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_hidden">fm_hidden</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$m_dbsession_id_name">m_dbsession_id_name</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$m_dbsession_id">m_dbsession_id</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a179"></a>        <span class="src-sym">}</span></li>
<li><a name="a180"></a>&nbsp;</li>
<li><a name="a181"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a182"></a>    <span class="src-sym">}</span></li>
<li><a name="a183"></a>&nbsp;</li>
<li><a name="a184"></a>    <span class="src-doc">/**</span></li>
<li><a name="a185"></a><span class="src-doc">     * close tag for HTML form</span></li>
<li><a name="a186"></a><span class="src-doc">     *</span></li>
<li><a name="a187"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a188"></a><span class="src-doc">     */</span></li>
<li><a name="a189"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_end">fm_end</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a190"></a>    <span class="src-sym">{</span></li>
<li><a name="a191"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&lt;/form&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a192"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a193"></a>    <span class="src-sym">}</span></li>
<li><a name="a194"></a>&nbsp;</li>
<li><a name="a195"></a>    <span class="src-doc">/**</span></li>
<li><a name="a196"></a><span class="src-doc">     * Add formular error message to stack ($this-&gt;form_errors)</span></li>
<li><a name="a197"></a><span class="src-doc">     *</span></li>
<li><a name="a198"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$message </span><span class="src-doc">   error message</span></li>
<li><a name="a199"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$field </span><span class="src-doc">       name of formular object    (use , if you want more than one fields)</span></li>
<li><a name="a200"></a><span class="src-doc">     */</span></li>
<li><a name="a201"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodadd_form_error">add_form_error</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">, </span><span class="src-var">$field</span>=<span class="src-id">null</span><span class="src-sym">)</span></li>
<li><a name="a202"></a>    <span class="src-sym">{</span></li>
<li><a name="a203"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">))</span></li>
<li><a name="a204"></a>        <span class="src-sym">{</span></li>
<li><a name="a205"></a>            <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">)))</span></li>
<li><a name="a206"></a>            <span class="src-sym">{</span></li>
<li><a name="a207"></a>                <span class="src-var">$field </span>= <span class="src-str">&quot;global_errors&quot;</span><span class="src-sym">;</span></li>
<li><a name="a208"></a>            <span class="src-sym">}</span></li>
<li><a name="a209"></a>&nbsp;</li>
<li><a name="a210"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">[</span><span class="src-var">$field</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$message</span><span class="src-sym">;</span></li>
<li><a name="a211"></a>        <span class="src-sym">}</span></li>
<li><a name="a212"></a>    <span class="src-sym">}</span></li>
<li><a name="a213"></a>&nbsp;</li>
<li><a name="a214"></a>    <span class="src-doc">/**</span></li>
<li><a name="a215"></a><span class="src-doc">     * Remove formular error message from error stack ($this-&gt;form_errors)</span></li>
<li><a name="a216"></a><span class="src-doc">     *</span></li>
<li><a name="a217"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">    name of formular object    (use , if you want more than one fields)</span></li>
<li><a name="a218"></a><span class="src-doc">     *                     if no field name is defined, all error messages will be deleted</span></li>
<li><a name="a219"></a><span class="src-doc">     */</span></li>
<li><a name="a220"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodremove_form_error">remove_form_error</a><span class="src-sym">(</span><span class="src-var">$field</span>=<span class="src-id">null</span><span class="src-sym">)</span></li>
<li><a name="a221"></a>    <span class="src-sym">{</span></li>
<li><a name="a222"></a>        <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">))</span></li>
<li><a name="a223"></a>        <span class="src-sym">{</span></li>
<li><a name="a224"></a>            <span class="src-var">$fields </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a225"></a>&nbsp;</li>
<li><a name="a226"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">, </span><span class="src-str">&quot;,&quot;</span><span class="src-sym">))</span></li>
<li><a name="a227"></a>            <span class="src-sym">{</span></li>
<li><a name="a228"></a>                <span class="src-var">$fields </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;,&quot;</span><span class="src-sym">, </span><span class="src-var">$field</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a229"></a>            <span class="src-sym">}</span></li>
<li><a name="a230"></a>            <span class="src-key">else</span></li>
<li><a name="a231"></a>            <span class="src-sym">{</span></li>
<li><a name="a232"></a>                <span class="src-var">$fields</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$field</span><span class="src-sym">;</span></li>
<li><a name="a233"></a>            <span class="src-sym">}</span></li>
<li><a name="a234"></a>&nbsp;</li>
<li><a name="a235"></a>            <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$key</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$fields</span><span class="src-sym">))</span></li>
<li><a name="a236"></a>            <span class="src-sym">{</span></li>
<li><a name="a237"></a>                <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">))</span></li>
<li><a name="a238"></a>                <span class="src-sym">{</span></li>
<li><a name="a239"></a>                    unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a240"></a>                <span class="src-sym">}</span></li>
<li><a name="a241"></a>            <span class="src-sym">}</span></li>
<li><a name="a242"></a>&nbsp;</li>
<li><a name="a243"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">)</span></li>
<li><a name="a244"></a>            <span class="src-sym">{</span></li>
<li><a name="a245"></a>                unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a246"></a>            <span class="src-sym">}</span></li>
<li><a name="a247"></a>        <span class="src-sym">}</span></li>
<li><a name="a248"></a>        <span class="src-key">else</span></li>
<li><a name="a249"></a>        <span class="src-sym">{</span></li>
<li><a name="a250"></a>            unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a251"></a>        <span class="src-sym">}</span></li>
<li><a name="a252"></a>    <span class="src-sym">}</span></li>
<li><a name="a253"></a>&nbsp;</li>
<li><a name="a254"></a>    <span class="src-doc">/**</span></li>
<li><a name="a255"></a><span class="src-doc">     * Exists a formular error</span></li>
<li><a name="a256"></a><span class="src-doc">     *</span></li>
<li><a name="a257"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   only check this field (use , if you want more than one fields)</span></li>
<li><a name="a258"></a><span class="src-doc">     *                     if empty all fields</span></li>
<li><a name="a259"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">    true, if error exists</span></li>
<li><a name="a260"></a><span class="src-doc">     */</span></li>
<li><a name="a261"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$field</span>=<span class="src-id">null</span><span class="src-sym">)</span></li>
<li><a name="a262"></a>    <span class="src-sym">{</span></li>
<li><a name="a263"></a>        <span class="src-var">$rc </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a264"></a>&nbsp;</li>
<li><a name="a265"></a>        <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span>&gt;<span class="src-num">0</span><span class="src-sym">))</span></li>
<li><a name="a266"></a>        <span class="src-sym">{</span></li>
<li><a name="a267"></a>            <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">))</span></li>
<li><a name="a268"></a>            <span class="src-sym">{</span></li>
<li><a name="a269"></a>                <span class="src-var">$fields </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a270"></a>&nbsp;</li>
<li><a name="a271"></a>                <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$field</span><span class="src-sym">, </span><span class="src-str">&quot;,&quot;</span><span class="src-sym">))</span></li>
<li><a name="a272"></a>                <span class="src-sym">{</span></li>
<li><a name="a273"></a>                    <span class="src-var">$fields </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;,&quot;</span><span class="src-sym">, </span><span class="src-var">$field</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a274"></a>                <span class="src-sym">}</span></li>
<li><a name="a275"></a>                <span class="src-key">else</span></li>
<li><a name="a276"></a>                <span class="src-sym">{</span></li>
<li><a name="a277"></a>                    <span class="src-var">$fields</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$field</span><span class="src-sym">;</span></li>
<li><a name="a278"></a>                <span class="src-sym">}</span></li>
<li><a name="a279"></a>&nbsp;</li>
<li><a name="a280"></a>                <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$key</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$fields</span><span class="src-sym">))</span></li>
<li><a name="a281"></a>                <span class="src-sym">{</span></li>
<li><a name="a282"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">))</span></li>
<li><a name="a283"></a>                    <span class="src-sym">{</span></li>
<li><a name="a284"></a>                        <span class="src-var">$rc </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a285"></a>                        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a286"></a>                    <span class="src-sym">}</span></li>
<li><a name="a287"></a>                <span class="src-sym">}</span></li>
<li><a name="a288"></a>            <span class="src-sym">}</span></li>
<li><a name="a289"></a>            <span class="src-key">else</span></li>
<li><a name="a290"></a>            <span class="src-sym">{</span></li>
<li><a name="a291"></a>                <span class="src-var">$rc </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a292"></a>            <span class="src-sym">}</span></li>
<li><a name="a293"></a>        <span class="src-sym">}</span></li>
<li><a name="a294"></a>&nbsp;</li>
<li><a name="a295"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a296"></a>    <span class="src-sym">}</span></li>
<li><a name="a297"></a>&nbsp;</li>
<li><a name="a298"></a>    <span class="src-doc">/**</span></li>
<li><a name="a299"></a><span class="src-doc">     * Get formular error messages</span></li>
<li><a name="a300"></a><span class="src-doc">     *</span></li>
<li><a name="a301"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">    true, if error exists</span></li>
<li><a name="a302"></a><span class="src-doc">     */</span></li>
<li><a name="a303"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodget_form_errors">get_form_errors</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a304"></a>    <span class="src-sym">{</span></li>
<li><a name="a305"></a>        <span class="src-var">$rc </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a306"></a>&nbsp;</li>
<li><a name="a307"></a>        <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a308"></a>        <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$enote</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">))</span></li>
<li><a name="a309"></a>        <span class="src-sym">{</span></li>
<li><a name="a310"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$enote</span><span class="src-sym">))</span></li>
<li><a name="a311"></a>            <span class="src-sym">{</span></li>
<li><a name="a312"></a>                <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$d_enote</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$enote</span><span class="src-sym">))</span></li>
<li><a name="a313"></a>                <span class="src-sym">{</span></li>
<li><a name="a314"></a>                    <span class="src-var">$rc</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$d_enote</span><span class="src-sym">;</span></li>
<li><a name="a315"></a>                <span class="src-sym">}</span></li>
<li><a name="a316"></a>            <span class="src-sym">}</span></li>
<li><a name="a317"></a>            <span class="src-key">else</span></li>
<li><a name="a318"></a>            <span class="src-sym">{</span></li>
<li><a name="a319"></a>                <span class="src-var">$rc</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$enote</span><span class="src-sym">;</span></li>
<li><a name="a320"></a>            <span class="src-sym">}</span></li>
<li><a name="a321"></a>        <span class="src-sym">}</span></li>
<li><a name="a322"></a>&nbsp;</li>
<li><a name="a323"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a324"></a>    <span class="src-sym">}</span></li>
<li><a name="a325"></a>&nbsp;</li>
<li><a name="a326"></a>    <span class="src-doc">/**</span></li>
<li><a name="a327"></a><span class="src-doc">     * show all formular errors</span></li>
<li><a name="a328"></a><span class="src-doc">     *</span></li>
<li><a name="a329"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">        html list of errors</span></li>
<li><a name="a330"></a><span class="src-doc">     */</span></li>
<li><a name="a331"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodshow_form_errors">show_form_errors</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a332"></a>    <span class="src-sym">{</span></li>
<li><a name="a333"></a>        <span class="src-var">$output </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a334"></a>&nbsp;</li>
<li><a name="a335"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-sym">))</span></li>
<li><a name="a336"></a>        <span class="src-sym">{</span></li>
<li><a name="a337"></a>            <span class="src-var">$err_count </span>= <span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a338"></a>            <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a339"></a>&nbsp;</li>
<li><a name="a340"></a>            <span class="src-var">$message_block </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a341"></a>&nbsp;</li>
<li><a name="a342"></a>            <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$messages</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">))</span></li>
<li><a name="a343"></a>            <span class="src-sym">{</span></li>
<li><a name="a344"></a>                <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$message</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$messages</span><span class="src-sym">))</span></li>
<li><a name="a345"></a>                <span class="src-sym">{</span></li>
<li><a name="a346"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">))</span></li>
<li><a name="a347"></a>                    <span class="src-sym">{</span></li>
<li><a name="a348"></a>                        <span class="src-var">$err_count</span>++<span class="src-sym">;</span></li>
<li><a name="a349"></a>                        <span class="src-var">$message_block </span>.= <span class="src-str">&quot;&lt;li  class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_error_body">class_error_body</a>.<span class="src-str">&quot;</span><span class="src-str">\&quot;&gt;<span class="src-var">$message</span>&lt;/<span class="src-id">li</span>&gt;\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a350"></a>                    <span class="src-sym">}</span></li>
<li><a name="a351"></a>                <span class="src-sym">}</span></li>
<li><a name="a352"></a>            <span class="src-sym">}</span></li>
<li><a name="a353"></a>&nbsp;</li>
<li><a name="a354"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;\n&lt;div class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_error_header">class_error_header</a>.<span class="src-str">&quot;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a355"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/form_error.gif\&quot; style=\&quot;border: 0;\&quot; alt=\&quot;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a356"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;span style=\&quot;font-weight: bold;\&quot;&gt;&quot;</span>.<span class="src-id">STR_FORM_ERROR_HEADER</span>.<span class="src-str">&quot;&amp;nbsp;(&quot;</span>.<span class="src-var">$err_count</span>.<span class="src-str">&quot;):&lt;/span&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a357"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;br&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;ul&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a358"></a>&nbsp;</li>
<li><a name="a359"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$err_count</span>&gt;<span class="src-num">0</span><span class="src-sym">)</span></li>
<li><a name="a360"></a>            <span class="src-sym">{</span></li>
<li><a name="a361"></a>                <span class="src-var">$output </span>.= <span class="src-var">$message_block</span><span class="src-sym">;</span></li>
<li><a name="a362"></a>            <span class="src-sym">}</span></li>
<li><a name="a363"></a>            <span class="src-key">else</span></li>
<li><a name="a364"></a>            <span class="src-sym">{</span></li>
<li><a name="a365"></a>                <span class="src-var">$output </span>.=<span class="src-str">&quot;&lt;li class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_error_body">class_error_body</a>.<span class="src-str">&quot;\&quot;&gt;error message is missing. Please call for support.&lt;/li&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a366"></a>            <span class="src-sym">}</span></li>
<li><a name="a367"></a>&nbsp;</li>
<li><a name="a368"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;/ul&gt;&lt;/div&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a369"></a>        <span class="src-sym">}</span></li>
<li><a name="a370"></a>        <span class="src-key">else</span></li>
<li><a name="a371"></a>        <span class="src-sym">{</span></li>
<li><a name="a372"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;show_form_errors&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;error message is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a373"></a>        <span class="src-sym">}</span></li>
<li><a name="a374"></a>&nbsp;</li>
<li><a name="a375"></a>        <span class="src-key">return </span><span class="src-var">$output</span><span class="src-sym">;</span></li>
<li><a name="a376"></a>    <span class="src-sym">}</span></li>
<li><a name="a377"></a>&nbsp;</li>
<li><a name="a378"></a>    <span class="src-doc">/**</span></li>
<li><a name="a379"></a><span class="src-doc">     * Get error CSS class</span></li>
<li><a name="a380"></a><span class="src-doc">     *</span></li>
<li><a name="a381"></a><span class="src-doc">     * If err_mode = false and &quot;global_errors&quot; are defined, no shadow class is used! (inactive)</span></li>
<li><a name="a382"></a><span class="src-doc">     *</span></li>
<li><a name="a383"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span></li>
<li><a name="a384"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   </span><span class="src-doc-var">$with_opera_color </span></li>
<li><a name="a385"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a386"></a><span class="src-doc">     */</span></li>
<li><a name="a387"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$with_opera_color</span>=<span class="src-id">false</span><span class="src-sym">)</span></li>
<li><a name="a388"></a>    <span class="src-sym">{</span></li>
<li><a name="a389"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a390"></a>&nbsp;</li>
<li><a name="a391"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-sym">))</span></li>
<li><a name="a392"></a>        <span class="src-sym">{</span></li>
<li><a name="a393"></a>            <span class="src-comm">// temp array</span></li>
<li><a name="a394"></a>            <span class="src-var">$form_errors </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a395"></a>&nbsp;</li>
<li><a name="a396"></a>            <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a397"></a>            <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-var">$keys</span><span class="src-sym">, </span><span class="src-var">$messages</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$form_errors">form_errors</a><span class="src-sym">))</span></li>
<li><a name="a398"></a>            <span class="src-sym">{</span></li>
<li><a name="a399"></a>                <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$keys</span><span class="src-sym">, </span><span class="src-str">&quot;,&quot;</span><span class="src-sym">))</span></li>
<li><a name="a400"></a>                <span class="src-sym">{</span></li>
<li><a name="a401"></a>&nbsp;</li>
<li><a name="a402"></a>                    <span class="src-var">$sub_keys </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;,&quot;</span><span class="src-sym">, </span><span class="src-var">$keys</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a403"></a>                    <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$key</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$sub_keys</span><span class="src-sym">))</span></li>
<li><a name="a404"></a>                    <span class="src-sym">{</span></li>
<li><a name="a405"></a>                        <span class="src-var">$form_errors</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-var">$messages</span><span class="src-sym">;</span></li>
<li><a name="a406"></a>                    <span class="src-sym">}</span></li>
<li><a name="a407"></a>                <span class="src-sym">}</span></li>
<li><a name="a408"></a>                <span class="src-key">else</span></li>
<li><a name="a409"></a>                <span class="src-sym">{</span></li>
<li><a name="a410"></a>                    <span class="src-var">$form_errors</span><span class="src-sym">[</span><span class="src-var">$keys</span><span class="src-sym">] </span>= <span class="src-var">$messages</span><span class="src-sym">;</span></li>
<li><a name="a411"></a>                <span class="src-sym">}</span></li>
<li><a name="a412"></a>            <span class="src-sym">}</span></li>
<li><a name="a413"></a>&nbsp;</li>
<li><a name="a414"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$err_mode">err_mode</a><span class="src-sym">)</span></li>
<li><a name="a415"></a>            <span class="src-sym">{</span></li>
<li><a name="a416"></a>                <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$form_errors</span><span class="src-sym">)) </span>&amp;&amp;</li>
<li><a name="a417"></a>                    <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$form_errors</span><span class="src-sym">[</span><span class="src-var">$name</span><span class="src-sym">]</span><span class="src-sym">)))</span></li>
<li><a name="a418"></a>                <span class="src-sym">{</span></li>
<li><a name="a419"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$with_opera_color</span><span class="src-sym">)</span></li>
<li><a name="a420"></a>                    <span class="src-sym">{</span></li>
<li><a name="a421"></a>                        <span class="src-var">$rc </span>.= <span class="src-str">&quot; style=\&quot;color: &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$error_color">error_color</a>.<span class="src-str">&quot;;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a422"></a>                    <span class="src-sym">}</span></li>
<li><a name="a423"></a>                    <span class="src-key">else</span></li>
<li><a name="a424"></a>                    <span class="src-sym">{</span></li>
<li><a name="a425"></a>                        <span class="src-var">$rc </span>.= <span class="src-str">&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_shadow">class_shadow</a>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a426"></a>                    <span class="src-sym">}</span></li>
<li><a name="a427"></a>                <span class="src-sym">}</span></li>
<li><a name="a428"></a>            <span class="src-sym">}</span></li>
<li><a name="a429"></a>            <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;global_errors&quot;</span><span class="src-sym">, </span><span class="src-var">$form_errors</span><span class="src-sym">))</span></li>
<li><a name="a430"></a>            <span class="src-sym">{</span></li>
<li><a name="a431"></a>                <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$form_errors</span><span class="src-sym">)) </span>||</li>
<li><a name="a432"></a>                    <span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$form_errors</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$form_errors</span><span class="src-sym">[</span><span class="src-var">$name</span><span class="src-sym">]</span><span class="src-sym">)))</span></li>
<li><a name="a433"></a>                <span class="src-sym">{</span></li>
<li><a name="a434"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$with_opera_color</span><span class="src-sym">)</span></li>
<li><a name="a435"></a>                    <span class="src-sym">{</span></li>
<li><a name="a436"></a>                        <span class="src-var">$rc </span>.= <span class="src-str">&quot; style=\&quot;color: &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$error_color">error_color</a>.<span class="src-str">&quot;;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a437"></a>                    <span class="src-sym">}</span></li>
<li><a name="a438"></a>                    <span class="src-key">else</span></li>
<li><a name="a439"></a>                    <span class="src-sym">{</span></li>
<li><a name="a440"></a>                        <span class="src-var">$rc </span>.= <span class="src-str">&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_shadow">class_shadow</a>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a441"></a>                    <span class="src-sym">}</span></li>
<li><a name="a442"></a>                <span class="src-sym">}</span></li>
<li><a name="a443"></a>            <span class="src-sym">}</span></li>
<li><a name="a444"></a>        <span class="src-sym">}</span></li>
<li><a name="a445"></a>&nbsp;</li>
<li><a name="a446"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$rc</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_non_error">class_non_error</a><span class="src-sym">)))    </span><span class="src-var">$rc </span>= <span class="src-str">&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_non_error">class_non_error</a>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a447"></a>&nbsp;</li>
<li><a name="a448"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a449"></a>    <span class="src-sym">}</span></li>
<li><a name="a450"></a>&nbsp;</li>
<li><a name="a451"></a>    <span class="src-doc">/**</span></li>
<li><a name="a452"></a><span class="src-doc">     * calculates select start for formular</span></li>
<li><a name="a453"></a><span class="src-doc">     *</span></li>
<li><a name="a454"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">       name of select tag</span></li>
<li><a name="a455"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">array </span><span class="src-doc">   </span><span class="src-doc-var">$fmdata </span><span class="src-doc">       array with options</span></li>
<li><a name="a456"></a><span class="src-doc">     *                                      value:</span></li>
<li><a name="a457"></a><span class="src-doc">     *                                      desc:</span></li>
<li><a name="a458"></a><span class="src-doc">     *                                      default: if true, this entry will be selected {default: false}</span></li>
<li><a name="a459"></a><span class="src-doc">     *                                      convert: if true, convert to html {default: true}</span></li>
<li><a name="a460"></a><span class="src-doc">     *                                      customize: other values like styles or ids</span></li>
<li><a name="a461"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$active </span><span class="src-doc">       if actuve is value a valid, this entry is selected {default: first in data array}</span></li>
<li><a name="a462"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$options </span><span class="src-doc">   other tag parameters</span></li>
<li><a name="a463"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$onchange </span><span class="src-doc">   onchange event</span></li>
<li><a name="a464"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a465"></a><span class="src-doc">     */</span></li>
<li><a name="a466"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$active</span>=<span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$onchange</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a467"></a>    <span class="src-sym">{</span></li>
<li><a name="a468"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">))</span></li>
<li><a name="a469"></a>        <span class="src-sym">{</span></li>
<li><a name="a470"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_select&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;missing fmdata array&quot;</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a471"></a>        <span class="src-sym">}</span></li>
<li><a name="a472"></a>&nbsp;</li>
<li><a name="a473"></a>        <span class="src-comm">// check if valid value will be found</span></li>
<li><a name="a474"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$active</span><span class="src-sym">))</span></li>
<li><a name="a475"></a>        <span class="src-sym">{</span></li>
<li><a name="a476"></a>            <span class="src-var">$active_found</span>=<span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a477"></a>            <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a478"></a>            <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$specs</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">))</span></li>
<li><a name="a479"></a>            <span class="src-sym">{</span></li>
<li><a name="a480"></a>                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$active</span>==<span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]</span><span class="src-sym">)</span></li>
<li><a name="a481"></a>                <span class="src-sym">{</span></li>
<li><a name="a482"></a>                    <span class="src-var">$active_found</span>=<span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a483"></a>                    <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a484"></a>                <span class="src-sym">}</span></li>
<li><a name="a485"></a>            <span class="src-sym">}</span></li>
<li><a name="a486"></a>            <span class="src-comm">// if not, set active to default value</span></li>
<li><a name="a487"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$active_found</span><span class="src-sym">)</span></li>
<li><a name="a488"></a>            <span class="src-sym">{</span></li>
<li><a name="a489"></a>                <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a490"></a>                <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$specs</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">))</span></li>
<li><a name="a491"></a>                <span class="src-sym">{</span></li>
<li><a name="a492"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'default'</span><span class="src-sym">]</span>==<span class="src-id">true</span><span class="src-sym">)</span></li>
<li><a name="a493"></a>                    <span class="src-sym">{</span></li>
<li><a name="a494"></a>                        <span class="src-var">$active </span>= <span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a495"></a>                        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a496"></a>                    <span class="src-sym">}</span></li>
<li><a name="a497"></a>                <span class="src-sym">}</span></li>
<li><a name="a498"></a>            <span class="src-sym">}</span></li>
<li><a name="a499"></a>        <span class="src-sym">}</span></li>
<li><a name="a500"></a>        <span class="src-comm">///////////////////////////////////////////////////////</span></li>
<li><a name="a501"></a>&nbsp;</li>
<li><a name="a502"></a>        <span class="src-var">$rc  </span>=  <span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">select</span> <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a503"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a504"></a>&nbsp;</li>
<li><a name="a505"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$options</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a506"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$onchange</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">onchange</span>=\&quot;<span class="src-var">$onchange</span>;\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a507"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a508"></a>&nbsp;</li>
<li><a name="a509"></a>        <a href="http://www.php.net/reset">reset</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a510"></a>        <span class="src-var">$select_set </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a511"></a>        <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$specs</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">))</span></li>
<li><a name="a512"></a>        <span class="src-sym">{</span></li>
<li><a name="a513"></a>            <span class="src-var">$rc </span>.=  <span class="src-str">&quot;\t&lt;option value=\&quot;&quot;</span>.<span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a514"></a>            <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$active</span>==<span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'value'</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$select_set</span><span class="src-sym">))</span></li>
<li><a name="a515"></a>            <span class="src-sym">{</span></li>
<li><a name="a516"></a>                <span class="src-var">$select_set </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a517"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot; selected=\&quot;selected\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a518"></a>            <span class="src-sym">}</span></li>
<li><a name="a519"></a>            <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span>isset<span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'default'</span><span class="src-sym">]</span><span class="src-sym">)) </span>&amp;&amp;</li>
<li><a name="a520"></a>                    <span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'default'</span><span class="src-sym">]</span>==<span class="src-id">true</span><span class="src-sym">) </span>&amp;&amp;</li>
<li><a name="a521"></a>                    <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$select_set</span><span class="src-sym">) </span>&amp;&amp;</li>
<li><a name="a522"></a>                    <span class="src-sym">(</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$active</span><span class="src-sym">, </span><span class="src-id">true</span><span class="src-sym">)))</span></li>
<li><a name="a523"></a>            <span class="src-sym">{</span></li>
<li><a name="a524"></a>                <span class="src-var">$select_set </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a525"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot; selected=\&quot;selected\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a526"></a>            <span class="src-sym">}</span></li>
<li><a name="a527"></a>            <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'customize'</span><span class="src-sym">]</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; &quot;</span>.<span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'customize'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a528"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a529"></a>&nbsp;</li>
<li><a name="a530"></a>            <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'convert'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a531"></a>            <span class="src-sym">{</span></li>
<li><a name="a532"></a>                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'convert'</span><span class="src-sym">]</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'desc'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a533"></a>                <span class="src-key">else                    </span><span class="src-var">$rc </span>.= <span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'desc'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a534"></a>            <span class="src-sym">}</span></li>
<li><a name="a535"></a>            <span class="src-key">else                        </span><span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$specs</span><span class="src-sym">[</span><span class="src-str">'desc'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a536"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/option&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a537"></a>        <span class="src-sym">}</span></li>
<li><a name="a538"></a>        <span class="src-var">$rc </span>.=    <span class="src-str">&quot;&lt;/select&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a539"></a>&nbsp;</li>
<li><a name="a540"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a541"></a>    <span class="src-sym">}</span></li>
<li><a name="a542"></a>&nbsp;</li>
<li><a name="a543"></a>    <span class="src-doc">/**</span></li>
<li><a name="a544"></a><span class="src-doc">     * calculates submit button string</span></li>
<li><a name="a545"></a><span class="src-doc">     *</span></li>
<li><a name="a546"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">           name of the button</span></li>
<li><a name="a547"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$value </span><span class="src-doc">           value of the button</span></li>
<li><a name="a548"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span><span class="src-doc">       other formular parameters, e.g. CLASS</span></li>
<li><a name="a549"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                   submit button string for formular</span></li>
<li><a name="a550"></a><span class="src-doc">     */</span></li>
<li><a name="a551"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_submit">fm_submit</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,</span><span class="src-var">$value</span><span class="src-sym">,</span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a552"></a>    <span class="src-sym">{</span></li>
<li><a name="a553"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span>&lt;<span class="src-num">10</span><span class="src-sym">)</span></li>
<li><a name="a554"></a>            <span class="src-var">$value </span>= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span>.<span class="src-var">$value</span>.<span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a555"></a>&nbsp;</li>
<li><a name="a556"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&lt;input type=\&quot;submit\&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_button">class_button</a>.<span class="src-str">&quot;</span><span class="src-str">\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot; <span class="src-id">value</span>=\&quot;<span class="src-var">$value</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a557"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))</span></li>
<li><a name="a558"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$customize</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a559"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a560"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a561"></a>    <span class="src-sym">}</span></li>
<li><a name="a562"></a>&nbsp;</li>
<li><a name="a563"></a>    <span class="src-doc">/**</span></li>
<li><a name="a564"></a><span class="src-doc">     * Calculates button string</span></li>
<li><a name="a565"></a><span class="src-doc">     *</span></li>
<li><a name="a566"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">           name of the button</span></li>
<li><a name="a567"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$value </span><span class="src-doc">           value of the button</span></li>
<li><a name="a568"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$onclick </span><span class="src-doc">       onclick event (e.g. javascript:...)</span></li>
<li><a name="a569"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span><span class="src-doc">       other tag parameter options like CLASS</span></li>
<li><a name="a570"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a571"></a><span class="src-doc">     */</span></li>
<li><a name="a572"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_button">fm_button</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$onclick</span><span class="src-sym">, </span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a573"></a>    <span class="src-sym">{</span></li>
<li><a name="a574"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span>&lt;<span class="src-num">10</span><span class="src-sym">)</span></li>
<li><a name="a575"></a>            <span class="src-var">$value </span>= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span>.<span class="src-var">$value</span>.<span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a576"></a>&nbsp;</li>
<li><a name="a577"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&lt;input type=\&quot;button\&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_button">class_button</a>.<span class="src-str">&quot;</span><span class="src-str">\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot; <span class="src-id">value</span>=\&quot;<span class="src-var">$value</span>\&quot; <span class="src-id">onclick</span>=\&quot;<span class="src-var">$onclick</span>;\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a578"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))</span></li>
<li><a name="a579"></a>        <span class="src-sym">{</span></li>
<li><a name="a580"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$customize</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a581"></a>        <span class="src-sym">}</span></li>
<li><a name="a582"></a>&nbsp;</li>
<li><a name="a583"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a584"></a>&nbsp;</li>
<li><a name="a585"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a586"></a>    <span class="src-sym">}</span></li>
<li><a name="a587"></a>&nbsp;</li>
<li><a name="a588"></a>    <span class="src-doc">/**</span></li>
<li><a name="a589"></a><span class="src-doc">     * calculates image button</span></li>
<li><a name="a590"></a><span class="src-doc">     *</span></li>
<li><a name="a591"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">           name of the button</span></li>
<li><a name="a592"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$image_name </span><span class="src-doc">       image name</span></li>
<li><a name="a593"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$alt_name </span><span class="src-doc">       alt text for image</span></li>
<li><a name="a594"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$onclick </span><span class="src-doc">       onclick event (e.g. javascript:...)</span></li>
<li><a name="a595"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span><span class="src-doc">       other tag parameter options like CLASS</span></li>
<li><a name="a596"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                   button string for formular</span></li>
<li><a name="a597"></a><span class="src-doc">     */</span></li>
<li><a name="a598"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_image">fm_image</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$image_name</span><span class="src-sym">, </span><span class="src-var">$alt_name</span><span class="src-sym">, </span><span class="src-var">$onclick</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a599"></a>    <span class="src-sym">{</span></li>
<li><a name="a600"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&lt;input type=\&quot;image\&quot; class=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$class_button">class_button</a>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a601"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a602"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">src</span>=\&quot;<span class="src-var">$image_name</span>\&quot; <span class="src-id">alt</span>=\&quot;<span class="src-var">$alt_name</span>\&quot; <span class="src-id">style</span>=\&quot;<span class="src-id">border</span>: <span class="src-id">none</span>; <span class="src-id">background</span>-<span class="src-id">color</span>: <span class="src-id">transparent</span>;\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a603"></a>&nbsp;</li>
<li><a name="a604"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$onclick</span><span class="src-sym">))   </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">onclick</span>=\&quot;<span class="src-var">$onclick</span>;\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a605"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$customize</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a606"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a607"></a>&nbsp;</li>
<li><a name="a608"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a609"></a>    <span class="src-sym">}</span></li>
<li><a name="a610"></a>&nbsp;</li>
<li><a name="a611"></a>    <span class="src-doc">/**</span></li>
<li><a name="a612"></a><span class="src-doc">     * calculates file input field</span></li>
<li><a name="a613"></a><span class="src-doc">     *</span></li>
<li><a name="a614"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span></li>
<li><a name="a615"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$size </span></li>
<li><a name="a616"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$onchange </span></li>
<li><a name="a617"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span></li>
<li><a name="a618"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a619"></a><span class="src-doc">     */</span></li>
<li><a name="a620"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_file">fm_file</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$size</span><span class="src-sym">, </span><span class="src-var">$onchange</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">,</span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a621"></a>    <span class="src-sym">{</span></li>
<li><a name="a622"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">input</span> <span class="src-id">type</span>=\&quot;<span class="src-id">file</span>\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot; <span class="src-id">size</span>=\&quot;<span class="src-var">$size</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a623"></a>&nbsp;</li>
<li><a name="a624"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a625"></a>&nbsp;</li>
<li><a name="a626"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$onchange</span><span class="src-sym">))        </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">onchange</span>=\&quot;<span class="src-var">$onchange</span>;\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a627"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))        </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$customize</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a628"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a629"></a>&nbsp;</li>
<li><a name="a630"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a631"></a>    <span class="src-sym">}</span></li>
<li><a name="a632"></a>&nbsp;</li>
<li><a name="a633"></a>    <span class="src-doc">/**</span></li>
<li><a name="a634"></a><span class="src-doc">     * calculates text field for formular</span></li>
<li><a name="a635"></a><span class="src-doc">     *</span></li>
<li><a name="a636"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span><span class="src-doc">               name of text tag</span></li>
<li><a name="a637"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$value </span><span class="src-doc">               content of text tag</span></li>
<li><a name="a638"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$cols </span><span class="src-doc">               number of colomns</span></li>
<li><a name="a639"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$rows </span><span class="src-doc">               number of rows</span></li>
<li><a name="a640"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$options </span><span class="src-doc">           other formular parameters like CLASS</span></li>
<li><a name="a641"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$text_mode </span><span class="src-doc">           0: no edit options</span></li>
<li><a name="a642"></a><span class="src-doc">     *                                         1: no edit options, with mce</span></li>
<li><a name="a643"></a><span class="src-doc">     *                                         2: edit options, text active</span></li>
<li><a name="a644"></a><span class="src-doc">     *                                         3: edit options, mce small active</span></li>
<li><a name="a645"></a><span class="src-doc">     *                                         4: edit options, mce large active</span></li>
<li><a name="a646"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   </span><span class="src-doc-var">$with_hidden_field </span></li>
<li><a name="a647"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                       text field string for formular</span></li>
<li><a name="a648"></a><span class="src-doc">     */</span></li>
<li><a name="a649"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_text">fm_text</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$cols</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$rows</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$text_mode</span>=<span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$with_hidden_field</span>=<span class="src-id">true</span><span class="src-sym">)</span></li>
<li><a name="a650"></a>    <span class="src-sym">{</span></li>
<li><a name="a651"></a>        <span class="src-key">if      </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;smallest&quot;</span><span class="src-sym">)                    </span><span class="src-var">$cols_value </span>= <span class="src-num">20</span><span class="src-sym">;</span></li>
<li><a name="a652"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;small&quot;</span><span class="src-sym">)                       </span><span class="src-var">$cols_value </span>= <span class="src-num">30</span><span class="src-sym">;</span></li>
<li><a name="a653"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;medium&quot;</span><span class="src-sym">)                      </span><span class="src-var">$cols_value </span>= <span class="src-num">38</span><span class="src-sym">;</span></li>
<li><a name="a654"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$cols</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;default&quot;</span><span class="src-sym">)) </span><span class="src-var">$cols_value </span>= <span class="src-num">45</span><span class="src-sym">;</span></li>
<li><a name="a655"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;big&quot;</span><span class="src-sym">)                         </span><span class="src-var">$cols_value </span>= <span class="src-num">50</span><span class="src-sym">;</span></li>
<li><a name="a656"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;biggest&quot;</span><span class="src-sym">)                     </span><span class="src-var">$cols_value </span>= <span class="src-num">65</span><span class="src-sym">;</span></li>
<li><a name="a657"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$cols</span>==<span class="src-str">&quot;s10&quot;</span><span class="src-sym">)                         </span><span class="src-var">$cols_value </span>= <span class="src-num">76</span><span class="src-sym">;</span></li>
<li><a name="a658"></a>        <span class="src-key">else                                           </span><span class="src-var">$cols_value </span>= <span class="src-var">$cols</span><span class="src-sym">;</span></li>
<li><a name="a659"></a>&nbsp;</li>
<li><a name="a660"></a>        <span class="src-key">if      </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;smallest&quot;</span><span class="src-sym">)                    </span><span class="src-var">$rows_value </span>= <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a661"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;small&quot;</span><span class="src-sym">)                       </span><span class="src-var">$rows_value </span>= <span class="src-num">4</span><span class="src-sym">;</span></li>
<li><a name="a662"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;medium&quot;</span><span class="src-sym">)                      </span><span class="src-var">$rows_value </span>= <span class="src-num">5</span><span class="src-sym">;</span></li>
<li><a name="a663"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$rows</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;default&quot;</span><span class="src-sym">)) </span><span class="src-var">$rows_value </span>= <span class="src-num">6</span><span class="src-sym">;</span></li>
<li><a name="a664"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;big&quot;</span><span class="src-sym">)                         </span><span class="src-var">$rows_value </span>= <span class="src-num">8</span><span class="src-sym">;</span></li>
<li><a name="a665"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;biggest&quot;</span><span class="src-sym">)                     </span><span class="src-var">$rows_value </span>= <span class="src-num">12</span><span class="src-sym">;</span></li>
<li><a name="a666"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$rows</span>==<span class="src-str">&quot;s10&quot;</span><span class="src-sym">)                         </span><span class="src-var">$rows_value </span>= <span class="src-num">15</span><span class="src-sym">;</span></li>
<li><a name="a667"></a>        <span class="src-key">else                                           </span><span class="src-var">$rows_value </span>= <span class="src-var">$rows</span><span class="src-sym">;</span></li>
<li><a name="a668"></a>&nbsp;</li>
<li><a name="a669"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;i&quot;</span><span class="src-sym">)</span></li>
<li><a name="a670"></a>            <span class="src-var">$cols_value </span>+= <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a671"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$os_type">os_type</a>==<span class="src-str">&quot;w&quot;</span><span class="src-sym">)</span></li>
<li><a name="a672"></a>            <span class="src-var">$cols_value </span>-= <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a673"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;o&quot;</span><span class="src-sym">)</span></li>
<li><a name="a674"></a>            <span class="src-var">$cols_value </span>+= <span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a675"></a>&nbsp;</li>
<li><a name="a676"></a>        <span class="src-var">$output </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a677"></a>&nbsp;</li>
<li><a name="a678"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>&gt;<span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a679"></a>        <span class="src-sym">{</span></li>
<li><a name="a680"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;table cellpadding=\&quot;0\&quot; style=\&quot;width: 100%\&quot;&gt;</span></li>
<li><a name="a681"></a><span class="src-str">                        &lt;tr&gt;&lt;td align=\&quot;right\&quot; style=\&quot;background-color: #f0f0ee;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a682"></a>&nbsp;</li>
<li><a name="a683"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$with_hidden_field</span><span class="src-sym">)</span></li>
<li><a name="a684"></a>            <span class="src-sym">{</span></li>
<li><a name="a685"></a>                <span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_hidden">fm_hidden</a><span class="src-sym">(</span><span class="src-str">&quot;run_text_mode&quot;</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a686"></a>            <span class="src-sym">}</span></li>
<li><a name="a687"></a>&nbsp;</li>
<li><a name="a688"></a>            <span class="src-var">$formdef </span>= <span class="src-str">&quot;document.mask&quot;</span><span class="src-sym">;</span></li>
<li><a name="a689"></a>            <span class="src-var">$start_url    </span>= <span class="src-str">&quot;javascript:&quot;</span>.<span class="src-var">$formdef</span>.<span class="src-str">&quot;.text_mode.value=&quot;</span><span class="src-sym">;</span></li>
<li><a name="a690"></a>            <span class="src-var">$mode_url    </span>= <span class="src-var">$formdef</span>.<span class="src-str">&quot;.run_text_mode.value=1;&quot;</span>.<span class="src-var">$formdef</span>.<span class="src-str">&quot;.submit()&quot;</span><span class="src-sym">;</span></li>
<li><a name="a691"></a>&nbsp;</li>
<li><a name="a692"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>==<span class="src-num">2</span><span class="src-sym">)    </span><span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_text_active.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_TEXT_VIEW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_TEXT_VIEW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a693"></a>            <span class="src-key">else                 </span><span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$start_url</span>.<span class="src-str">&quot;2;&quot;</span>.<span class="src-var">$mode_url</span><span class="src-sym">, </span><span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_text.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_TEXT_VIEW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_TEXT_VIEW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">, </span><span class="src-id">STR_TEXT_VIEW</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a694"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a695"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>==<span class="src-num">3</span><span class="src-sym">)    </span><span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_mce_active.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a696"></a>            <span class="src-key">else                 </span><span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$start_url</span>.<span class="src-str">&quot;3;&quot;</span>.<span class="src-var">$mode_url</span><span class="src-sym">, </span><span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_mce.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">, </span><span class="src-id">STR_MCE_VIEW</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a697"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a698"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>==<span class="src-num">4</span><span class="src-sym">)    </span><span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_mce_large_active.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW_LARGE</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW_LARGE</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a699"></a>            <span class="src-key">else                 </span><span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$start_url</span>.<span class="src-str">&quot;4;&quot;</span>.<span class="src-var">$mode_url</span><span class="src-sym">, </span><span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-id">IMAGE_URL</span>.<span class="src-str">&quot;/button_mce_large.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW_LARGE</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_MCE_VIEW_LARGE</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-num">1</span><span class="src-sym">, </span><span class="src-id">STR_MCE_VIEW_LARGE</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a700"></a>&nbsp;</li>
<li><a name="a701"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a702"></a>        <span class="src-sym">}</span></li>
<li><a name="a703"></a>&nbsp;</li>
<li><a name="a704"></a>        <span class="src-var">$output </span>.=  <span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">textarea</span> <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a705"></a>        <span class="src-var">$output </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">cols</span>=\&quot;<span class="src-var">$cols_value</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a706"></a>&nbsp;</li>
<li><a name="a707"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>==<span class="src-num">4</span><span class="src-sym">)    </span><span class="src-var">$output </span>.=<span class="src-str">&quot; rows=\&quot;32\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a708"></a>        <span class="src-key">else                 </span><span class="src-var">$output </span>.=<span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">rows</span>=\&quot;<span class="src-var">$rows_value</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a709"></a>&nbsp;</li>
<li><a name="a710"></a>        <span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a711"></a>&nbsp;</li>
<li><a name="a712"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">))    </span><span class="src-var">$output </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$options</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a713"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$text_mode</span>!=<span class="src-num">0</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$text_mode</span>!=<span class="src-num">2</span><span class="src-sym">))        </span><span class="src-var">$output </span>.= <span class="src-str">&quot; mce_editable=\&quot;true\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a714"></a>        <span class="src-var">$output </span>.= <span class="src-str">&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a715"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span></li>
<li><a name="a716"></a>        <span class="src-sym">{</span></li>
<li><a name="a717"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>&gt;<span class="src-num">1</span><span class="src-sym">)    </span><span class="src-var">$output </span>.= <a href="http://www.php.net/nl2br">nl2br</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a718"></a>            <span class="src-key">else                </span><span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a719"></a>        <span class="src-sym">}</span></li>
<li><a name="a720"></a>        <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;/textarea&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a721"></a>&nbsp;</li>
<li><a name="a722"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$text_mode</span>&gt;<span class="src-num">1</span><span class="src-sym">)</span></li>
<li><a name="a723"></a>        <span class="src-sym">{</span></li>
<li><a name="a724"></a>            <span class="src-var">$output </span>.= <span class="src-str">&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a725"></a>        <span class="src-sym">}</span></li>
<li><a name="a726"></a>&nbsp;</li>
<li><a name="a727"></a>        <span class="src-key">return </span><span class="src-var">$output</span><span class="src-sym">;</span></li>
<li><a name="a728"></a>    <span class="src-sym">}</span></li>
<li><a name="a729"></a>&nbsp;</li>
<li><a name="a730"></a>    <span class="src-doc">/**</span></li>
<li><a name="a731"></a><span class="src-doc">     * calculates Date select string</span></li>
<li><a name="a732"></a><span class="src-doc">     *</span></li>
<li><a name="a733"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">array </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span><span class="src-doc">   array with the following keys:</span></li>
<li><a name="a734"></a><span class="src-doc">     *                                          name_year        = select box name for year</span></li>
<li><a name="a735"></a><span class="src-doc">     *                                         name_month        = select box name for month</span></li>
<li><a name="a736"></a><span class="src-doc">     *                                         name_day        = select box name for day</span></li>
<li><a name="a737"></a><span class="src-doc">     *                                         name_hour        = select box name for hour</span></li>
<li><a name="a738"></a><span class="src-doc">     *                                         name_minute        = select box name for minute</span></li>
<li><a name="a739"></a><span class="src-doc">     *                                         value_year        = selected year                {default: current year}</span></li>
<li><a name="a740"></a><span class="src-doc">     *                                         value_month        = selected month               {default: current month}</span></li>
<li><a name="a741"></a><span class="src-doc">     *                                         value_day        = selectd day                  {default: current day}</span></li>
<li><a name="a742"></a><span class="src-doc">     *                                         value_hour        = selected hour                {default: current hour}</span></li>
<li><a name="a743"></a><span class="src-doc">     *                                         value_minute    = selected_minute              {default: current minute}</span></li>
<li><a name="a744"></a><span class="src-doc">     *                                          with_time        = it true, with time and title {default: false}</span></li>
<li><a name="a745"></a><span class="src-doc">     *                                         with_alltime    = it true, with alltime event  {default: false}</span></li>
<li><a name="a746"></a><span class="src-doc">     *                                          name_alltime    = name of alltime checkbox</span></li>
<li><a name="a747"></a><span class="src-doc">     *                                         value_alltime    = if &quot;Y&quot;, it is selected       {default: &quot;N&quot;}</span></li>
<li><a name="a748"></a><span class="src-doc">     *                                         minute_int        = minute interval 1, 5, 10 or 15               {default: 5 }</span></li>
<li><a name="a749"></a><span class="src-doc">     *                                         with_run        = true, if with run button     {default: false}</span></li>
<li><a name="a750"></a><span class="src-doc">     *                                         prefix            = if defined, it will be print</span></li>
<li><a name="a751"></a><span class="src-doc">     *                                                             in front of the first select box</span></li>
<li><a name="a752"></a><span class="src-doc">     *                                          start_year        = set this, if the selection shall not start from year 1970</span></li>
<li><a name="a753"></a><span class="src-doc">     *                                         end_year        = set this, if the selection shall not end after year 2037</span></li>
<li><a name="a754"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$options </span><span class="src-doc">   other tag parameters like readonly or class</span></li>
<li><a name="a755"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">               date select string for formular</span></li>
<li><a name="a756"></a><span class="src-doc">     */</span></li>
<li><a name="a757"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_date">fm_date</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a758"></a>    <span class="src-sym">{</span></li>
<li><a name="a759"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'start_year'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a760"></a>            <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'start_year'</span><span class="src-sym">] </span>= <span class="src-num">1901</span><span class="src-sym">;</span></li>
<li><a name="a761"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'end_year'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'end_year'</span><span class="src-sym">]</span><span class="src-sym">)</span>&gt;<span class="src-num">2037</span><span class="src-sym">))</span></li>
<li><a name="a762"></a>            <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'end_year'</span><span class="src-sym">] </span>= <span class="src-num">2037</span><span class="src-sym">;</span></li>
<li><a name="a763"></a>&nbsp;</li>
<li><a name="a764"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_year'</span><span class="src-sym">]</span><span class="src-sym">))   </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_year is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a765"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_month'</span><span class="src-sym">]</span><span class="src-sym">))  </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_month is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a766"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_day'</span><span class="src-sym">]</span><span class="src-sym">))    </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_day is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a767"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_time'</span><span class="src-sym">]</span>!=<span class="src-id">true</span><span class="src-sym">)    </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_time'</span><span class="src-sym">]   </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a768"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_run'</span><span class="src-sym">]</span>!=<span class="src-id">true</span><span class="src-sym">)     </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_run'</span><span class="src-sym">]    </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a769"></a>&nbsp;</li>
<li><a name="a770"></a>        <span class="src-key">if </span><span class="src-sym">((</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_year'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_year'</span><span class="src-sym">]</span>&lt;<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'start_year'</span><span class="src-sym">]</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_year'</span><span class="src-sym">]</span>&gt;<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'end_year'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a771"></a>            <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_year'</span><span class="src-sym">]  </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'Y'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a772"></a>&nbsp;</li>
<li><a name="a773"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_month'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_month'</span><span class="src-sym">]</span>&gt;<span class="src-num">12</span><span class="src-sym">))</span></li>
<li><a name="a774"></a>            <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_month'</span><span class="src-sym">] </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'m'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a775"></a>&nbsp;</li>
<li><a name="a776"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_day'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_day'</span><span class="src-sym">]</span>&gt;<span class="src-num">31</span><span class="src-sym">))</span></li>
<li><a name="a777"></a>            <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_day'</span><span class="src-sym">] </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'d'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a778"></a>&nbsp;</li>
<li><a name="a779"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_time'</span><span class="src-sym">]</span><span class="src-sym">)</span></li>
<li><a name="a780"></a>        <span class="src-sym">{</span></li>
<li><a name="a781"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_hour'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a782"></a>            <span class="src-sym">{</span></li>
<li><a name="a783"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_hour is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a784"></a>            <span class="src-sym">}</span></li>
<li><a name="a785"></a>            <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_minute'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a786"></a>            <span class="src-sym">{</span></li>
<li><a name="a787"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_minute is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a788"></a>            <span class="src-sym">}</span></li>
<li><a name="a789"></a>&nbsp;</li>
<li><a name="a790"></a>            <span class="src-key">if </span><span class="src-sym">((</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]</span>&gt;<span class="src-num">23</span><span class="src-sym">))</span></li>
<li><a name="a791"></a>                <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]   </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'H'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a792"></a>            <span class="src-key">if </span><span class="src-sym">((</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>&gt;<span class="src-num">59</span><span class="src-sym">))</span></li>
<li><a name="a793"></a>                <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">] </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">'i'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a794"></a>&nbsp;</li>
<li><a name="a795"></a>            <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_alltime'</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_alltime'</span><span class="src-sym">]</span><span class="src-sym">)))</span></li>
<li><a name="a796"></a>            <span class="src-sym">{</span></li>
<li><a name="a797"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodshow_error">show_error</a><span class="src-sym">(</span><span class="src-str">&quot;fm_date&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;name_alltime is missing&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a798"></a>            <span class="src-sym">}</span></li>
<li><a name="a799"></a>        <span class="src-sym">}</span></li>
<li><a name="a800"></a>&nbsp;</li>
<li><a name="a801"></a>        <span class="src-var">$rc  </span>= <span class="src-str">&quot;&lt;table cellpadding=\&quot;0\&quot; cellspacing=\&quot;0\&quot; style=\&quot;border: 0;\&quot;&gt;&lt;tr&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a802"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'prefix'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;&quot;</span>.<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'prefix'</span><span class="src-sym">]</span>.<span class="src-str">&quot;:&amp;nbsp;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a803"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a804"></a>&nbsp;</li>
<li><a name="a805"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_time'</span><span class="src-sym">]</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-id">STR_DATE</span>.<span class="src-str">&quot;:&lt;br&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a806"></a>&nbsp;</li>
<li><a name="a807"></a>        <span class="src-comm">// day</span></li>
<li><a name="a808"></a>        <span class="src-comm">//////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></li>
<li><a name="a809"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a810"></a>        <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">1</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-num">32</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a811"></a>        <span class="src-sym">{</span></li>
<li><a name="a812"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">)</span>&lt;<span class="src-num">2</span><span class="src-sym">)    </span><span class="src-var">$show_i </span>= <span class="src-str">&quot;0&quot;</span>.<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a813"></a>            <span class="src-key">else                </span><span class="src-var">$show_i </span>= <span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a814"></a>            <span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$show_i</span>.<span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a815"></a>        <span class="src-sym">}</span></li>
<li><a name="a816"></a>        <span class="src-var">$rc_day </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_day'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_day'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a817"></a>&nbsp;</li>
<li><a name="a818"></a>        <span class="src-comm">// month</span></li>
<li><a name="a819"></a>        <span class="src-comm">//////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></li>
<li><a name="a820"></a>        unset<span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a821"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a822"></a>        <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">1</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-num">13</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a823"></a>        <span class="src-sym">{</span></li>
<li><a name="a824"></a>            <span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-id">Date_Calc</span><span class="src-sym">::</span><span class="src-id">getMonthFullname</span><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a825"></a>        <span class="src-sym">}</span></li>
<li><a name="a826"></a>        <span class="src-var">$rc_month </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_month'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_month'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a827"></a>&nbsp;</li>
<li><a name="a828"></a>        <span class="src-comm">// year</span></li>
<li><a name="a829"></a>        <span class="src-comm">//////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></li>
<li><a name="a830"></a>        unset<span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a831"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a832"></a>        <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'start_year'</span><span class="src-sym">]</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;=<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'end_year'</span><span class="src-sym">]</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a833"></a>        <span class="src-sym">{</span></li>
<li><a name="a834"></a>            <span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$i</span>.<span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a835"></a>        <span class="src-sym">}</span></li>
<li><a name="a836"></a>        <span class="src-var">$rc_year </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_year'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_year'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a837"></a>&nbsp;</li>
<li><a name="a838"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$date_format">date_format</a>==<span class="src-str">&quot;I&quot;</span><span class="src-sym">)        </span><span class="src-var">$rc </span>.= <span class="src-var">$rc_month</span>.<span class="src-var">$rc_day</span>.<span class="src-var">$rc_year</span><span class="src-sym">;</span></li>
<li><a name="a839"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$date_format">date_format</a>==<span class="src-str">&quot;S&quot;</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-var">$rc_year</span>.<span class="src-var">$rc_month</span>.<span class="src-var">$rc_day</span><span class="src-sym">;</span></li>
<li><a name="a840"></a>        <span class="src-key">else                                </span><span class="src-var">$rc </span>.= <span class="src-var">$rc_day</span>.<span class="src-var">$rc_month</span>.<span class="src-var">$rc_year</span><span class="src-sym">;</span></li>
<li><a name="a841"></a>&nbsp;</li>
<li><a name="a842"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_time'</span><span class="src-sym">]</span><span class="src-sym">)</span></li>
<li><a name="a843"></a>        <span class="src-sym">{</span></li>
<li><a name="a844"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/td&gt;&lt;td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a845"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span>.<span class="src-id">STR_TIME</span>.<span class="src-str">&quot;:&lt;br&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a846"></a>&nbsp;</li>
<li><a name="a847"></a>            <span class="src-comm">// minute</span></li>
<li><a name="a848"></a>            <span class="src-comm">//////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></li>
<li><a name="a849"></a>            <span class="src-var">$fmdata_m </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a850"></a>&nbsp;</li>
<li><a name="a851"></a>            <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'minute_int'</span><span class="src-sym">]</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><a href="http://www.php.net/array_search">array_search</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'minute_int'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">, </span><span class="src-num">5</span><span class="src-sym">, </span><span class="src-num">10</span><span class="src-sym">, </span><span class="src-num">15</span><span class="src-sym">)))))</span></li>
<li><a name="a852"></a>                <span class="src-var">$minute_int </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'minute_int'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a853"></a>            <span class="src-key">else</span></li>
<li><a name="a854"></a>                <span class="src-var">$minute_int </span>= <span class="src-num">5</span><span class="src-sym">; </span><span class="src-comm">// default</span></li>
<li><a name="a855"></a>&nbsp;</li>
<li><a name="a856"></a>            <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">; </span><span class="src-var">$i</span>&lt;<span class="src-num">60</span><span class="src-sym">; </span><span class="src-var">$i</span>=<span class="src-var">$i</span>+<span class="src-var">$minute_int</span><span class="src-sym">)</span></li>
<li><a name="a857"></a>            <span class="src-sym">{</span></li>
<li><a name="a858"></a>                <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>!=<span class="src-var">$i</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$minute_int</span>&gt;<span class="src-num">1</span><span class="src-sym">) </span>&amp;&amp;</li>
<li><a name="a859"></a>                        <span class="src-sym">((</span><span class="src-var">$i</span>&lt;<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">((</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>+<span class="src-var">$minute_int</span>*<span class="src-num">2</span><span class="src-sym">)</span>&gt;<span class="src-num">59</span><span class="src-sym">))  </span>||</li>
<li><a name="a860"></a>                        <span class="src-sym">((</span><span class="src-var">$i</span>&gt;<span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span><span class="src-sym">) </span>&amp;&amp;</li>
<li><a name="a861"></a>                        <span class="src-sym">(</span><span class="src-var">$i</span>&lt;<span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>+<span class="src-var">$minute_int</span><span class="src-sym">)) </span>&amp;&amp;</li>
<li><a name="a862"></a>                        <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>+<span class="src-var">$minute_int</span><span class="src-sym">)</span>&lt;=<span class="src-num">59</span><span class="src-sym">))</span></li>
<li><a name="a863"></a>                    <span class="src-var">$default </span>= <span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a864"></a>                <span class="src-key">else</span></li>
<li><a name="a865"></a>                    <span class="src-var">$default </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a866"></a>&nbsp;</li>
<li><a name="a867"></a>                <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">)</span>&lt;<span class="src-num">2</span><span class="src-sym">)    </span><span class="src-var">$show_i </span>= <span class="src-str">&quot;0&quot;</span>.<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a868"></a>                <span class="src-key">else                </span><span class="src-var">$show_i </span>= <span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a869"></a>&nbsp;</li>
<li><a name="a870"></a>                <span class="src-var">$fmdata_m</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$show_i</span>.<span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">, </span><span class="src-str">'default'</span>=&gt;<span class="src-var">$default</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a871"></a>            <span class="src-sym">}</span></li>
<li><a name="a872"></a>&nbsp;</li>
<li><a name="a873"></a>            <span class="src-comm">// hour</span></li>
<li><a name="a874"></a>            <span class="src-comm">//////////////////////////////////////////////////////////////////////////////////////////////////////////////</span></li>
<li><a name="a875"></a>            <span class="src-var">$fmdata_h </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a876"></a>            <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-num">24</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a877"></a>            <span class="src-sym">{</span></li>
<li><a name="a878"></a>                <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$time_format">time_format</a>==<span class="src-str">&quot;Y&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$i</span>&gt;<span class="src-num">0</span><span class="src-sym">))</span></li>
<li><a name="a879"></a>                <span class="src-sym">{</span></li>
<li><a name="a880"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$time_format">time_format</a>==<span class="src-str">&quot;Y&quot;</span><span class="src-sym">)</span></li>
<li><a name="a881"></a>                    <span class="src-sym">{</span></li>
<li><a name="a882"></a>                        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">)</span>&lt;<span class="src-num">2</span><span class="src-sym">)    </span><span class="src-var">$curr_time </span>= <span class="src-str">&quot;0&quot;</span>.<span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a883"></a>                        <span class="src-key">else                </span><span class="src-var">$curr_time </span>= <span class="src-var">$i</span><span class="src-sym">;</span></li>
<li><a name="a884"></a>                    <span class="src-sym">}</span></li>
<li><a name="a885"></a>                    <span class="src-key">else</span></li>
<li><a name="a886"></a>                    <span class="src-sym">{</span></li>
<li><a name="a887"></a>                        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$i</span>&gt;<span class="src-num">12</span><span class="src-sym">)    </span><span class="src-var">$curr_time </span>= <span class="src-sym">(</span><span class="src-var">$i</span>-<span class="src-num">12</span><span class="src-sym">)</span>.<span class="src-str">&quot; pm&quot;</span><span class="src-sym">;</span></li>
<li><a name="a888"></a>                        <span class="src-key">else        </span><span class="src-var">$curr_time </span>= <span class="src-var">$i</span>.<span class="src-str">&quot; am&quot;</span><span class="src-sym">;</span></li>
<li><a name="a889"></a>                    <span class="src-sym">}</span></li>
<li><a name="a890"></a>                    <span class="src-var">$fmdata_h</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$curr_time</span>.<span class="src-str">&quot;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a891"></a>                <span class="src-sym">}</span></li>
<li><a name="a892"></a>            <span class="src-sym">}</span></li>
<li><a name="a893"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$time_format">time_format</a>!=<span class="src-str">&quot;Y&quot;</span><span class="src-sym">)</span></li>
<li><a name="a894"></a>                <span class="src-var">$fmdata_h</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-num">0</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-str">&quot;12 pm&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a895"></a>&nbsp;</li>
<li><a name="a896"></a>            <span class="src-key">if </span><span class="src-sym">(((</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span>+<span class="src-var">$minute_int</span><span class="src-sym">)</span>&gt;<span class="src-num">59</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]</span>&lt;=<span class="src-num">23</span><span class="src-sym">))</span></li>
<li><a name="a897"></a>            <span class="src-sym">{</span></li>
<li><a name="a898"></a>                <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]</span>++<span class="src-sym">;</span></li>
<li><a name="a899"></a>            <span class="src-sym">}</span></li>
<li><a name="a900"></a>&nbsp;</li>
<li><a name="a901"></a>            <span class="src-comm">// show time</span></li>
<li><a name="a902"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_hour'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$fmdata_h</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_hour'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">&quot;style=\&quot;text-align: right;\&quot; &quot;</span>.<span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a903"></a>&nbsp;</li>
<li><a name="a904"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_minute'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$fmdata_m</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_minute'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a905"></a>&nbsp;</li>
<li><a name="a906"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_alltime'</span><span class="src-sym">]</span><span class="src-sym">)</span></li>
<li><a name="a907"></a>            <span class="src-sym">{</span></li>
<li><a name="a908"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a909"></a>                <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_checkbox">fm_checkbox</a><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'name_alltime'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">&quot;Y&quot;</span><span class="src-sym">, </span><span class="src-id">STR_APPOINTMENT_ALLDAY</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'value_alltime'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a910"></a>            <span class="src-sym">}</span></li>
<li><a name="a911"></a>        <span class="src-sym">}</span></li>
<li><a name="a912"></a>&nbsp;</li>
<li><a name="a913"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/td&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a914"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'with_run'</span><span class="src-sym">]</span><span class="src-sym">)</span></li>
<li><a name="a915"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;&amp;nbsp;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_image">fm_image</a><span class="src-sym">(</span><span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/goto.gif&quot;</span><span class="src-sym">, </span><span class="src-id">STR_CALENDAR_JUMPTO</span><span class="src-sym">, </span><span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a916"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/tr&gt;&lt;/table&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a917"></a>&nbsp;</li>
<li><a name="a918"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a919"></a>    <span class="src-sym">}</span></li>
<li><a name="a920"></a>&nbsp;</li>
<li><a name="a921"></a>    <span class="src-doc">/**</span></li>
<li><a name="a922"></a><span class="src-doc">     * Hidden field</span></li>
<li><a name="a923"></a><span class="src-doc">     *</span></li>
<li><a name="a924"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$field_name </span></li>
<li><a name="a925"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$field_value </span></li>
<li><a name="a926"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   </span><span class="src-doc-var">$mode </span><span class="src-doc">           false: if empty, don't print it</span></li>
<li><a name="a927"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a928"></a><span class="src-doc">     */</span></li>
<li><a name="a929"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_hidden">fm_hidden</a><span class="src-sym">(</span><span class="src-var">$field_name</span><span class="src-sym">, </span><span class="src-var">$field_value</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$mode</span>=<span class="src-id">false</span><span class="src-sym">)</span></li>
<li><a name="a930"></a>    <span class="src-sym">{</span></li>
<li><a name="a931"></a>        <span class="src-var">$output </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a932"></a>&nbsp;</li>
<li><a name="a933"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$field_value</span><span class="src-sym">)) </span>|| <span class="src-sym">((</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$field_value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$mode</span><span class="src-sym">)))</span></li>
<li><a name="a934"></a>        <span class="src-sym">{</span></li>
<li><a name="a935"></a>             <span class="src-var">$output </span>.= <span class="src-str">&quot;</span><span class="src-str">\t&lt;<span class="src-id">input</span> <span class="src-id">type</span>=\&quot;<span class="src-id">hidden</span>\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$field_name</span>\&quot; <span class="src-id">value</span>=\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a936"></a>             <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_int">is_int</a><span class="src-sym">(</span><span class="src-var">$field_value</span><span class="src-sym">)) </span><span class="src-var">$output </span>.= <span class="src-var">$field_value</span><span class="src-sym">;</span></li>
<li><a name="a937"></a>             <span class="src-key">else                       </span><span class="src-var">$output </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$field_value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a938"></a>             <span class="src-var">$output </span>.= <span class="src-str">&quot;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a939"></a>        <span class="src-sym">}</span></li>
<li><a name="a940"></a>&nbsp;</li>
<li><a name="a941"></a>        <span class="src-key">return </span><span class="src-var">$output</span><span class="src-sym">;</span></li>
<li><a name="a942"></a>    <span class="src-sym">}</span></li>
<li><a name="a943"></a>&nbsp;</li>
<li><a name="a944"></a>    <span class="src-doc">/**</span></li>
<li><a name="a945"></a><span class="src-doc">     * checkbox for formular</span></li>
<li><a name="a946"></a><span class="src-doc">     *</span></li>
<li><a name="a947"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span></li>
<li><a name="a948"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$value </span></li>
<li><a name="a949"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$desc </span><span class="src-doc">           description behind checkbox</span></li>
<li><a name="a950"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$active_value </span><span class="src-doc">   active checkbox</span></li>
<li><a name="a951"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$options </span><span class="src-doc">       other optional tag parameters</span></li>
<li><a name="a952"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a953"></a><span class="src-doc">     */</span></li>
<li><a name="a954"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_checkbox">fm_checkbox</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$desc</span><span class="src-sym">, </span><span class="src-var">$active_value</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a955"></a>    <span class="src-sym">{</span></li>
<li><a name="a956"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">input</span> <span class="src-id">type</span>=\&quot;<span class="src-id">checkbox</span>\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a957"></a>&nbsp;</li>
<li><a name="a958"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot; value=\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a959"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_int">is_int</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a960"></a>        <span class="src-key">else                 </span><span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a961"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a962"></a>&nbsp;</li>
<li><a name="a963"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$active_value</span>==<span class="src-var">$value</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; checked=\&quot;checked\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a964"></a>&nbsp;</li>
<li><a name="a965"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;i&quot;</span><span class="src-sym">) </span><span class="src-comm">// fix ie style fault</span></li>
<li><a name="a966"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot; style=\&quot;background-color: transparent; border-style: none;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a967"></a>&nbsp;</li>
<li><a name="a968"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">))        </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$options</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a969"></a>&nbsp;</li>
<li><a name="a970"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$desc</span><span class="src-sym">))</span></li>
<li><a name="a971"></a>        <span class="src-sym">{</span></li>
<li><a name="a972"></a>            <span class="src-var">$id_name </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;[&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;-&quot;</span><span class="src-sym">, </span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a973"></a>            <span class="src-var">$id_name </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;]&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;-&quot;</span><span class="src-sym">, </span><span class="src-var">$id_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a974"></a>&nbsp;</li>
<li><a name="a975"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot; id=\&quot;&quot;</span>.<span class="src-var">$id_name</span>.<span class="src-str">&quot;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a976"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;label for=\&quot;&quot;</span>.<span class="src-var">$id_name</span>.<span class="src-str">&quot;\&quot;&gt;&quot;</span>.<span class="src-var">$desc</span>.<span class="src-str">&quot;&lt;/label&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a977"></a>        <span class="src-sym">}</span></li>
<li><a name="a978"></a>        <span class="src-key">else</span></li>
<li><a name="a979"></a>        <span class="src-sym">{</span></li>
<li><a name="a980"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a981"></a>        <span class="src-sym">}</span></li>
<li><a name="a982"></a>&nbsp;</li>
<li><a name="a983"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a984"></a>    <span class="src-sym">}</span></li>
<li><a name="a985"></a>&nbsp;</li>
<li><a name="a986"></a>    <span class="src-doc">/**</span></li>
<li><a name="a987"></a><span class="src-doc">     * checkbox for formular</span></li>
<li><a name="a988"></a><span class="src-doc">     *</span></li>
<li><a name="a989"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$name </span></li>
<li><a name="a990"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$value </span></li>
<li><a name="a991"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$desc </span><span class="src-doc">           description behind radio button</span></li>
<li><a name="a992"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$active_value </span><span class="src-doc">   active radio</span></li>
<li><a name="a993"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$alt_values </span><span class="src-doc">       alternate active values for other radio buttons. If no other radio button is correct,</span></li>
<li><a name="a994"></a><span class="src-doc">     *                                         that one with optional alt_values will be checked</span></li>
<li><a name="a995"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">       </span><span class="src-doc-var">$options </span><span class="src-doc">       other optional tag parameters</span></li>
<li><a name="a996"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                       string with checkbox for formular</span></li>
<li><a name="a997"></a><span class="src-doc">     */</span></li>
<li><a name="a998"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_radio">fm_radio</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$desc</span><span class="src-sym">, </span><span class="src-var">$active_value</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$alt_values</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a999"></a>    <span class="src-sym">{</span></li>
<li><a name="a1000"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;</span><span class="src-str">\t&lt;<span class="src-id">input</span> <span class="src-id">type</span>=\&quot;<span class="src-id">radio</span>\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1001"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;i&quot;</span><span class="src-sym">) </span><span class="src-comm">// fix ie style fault</span></li>
<li><a name="a1002"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;style=\&quot;background-color: transparent; border-style: none;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1003"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;o&quot;</span><span class="src-sym">) </span><span class="src-comm">// only works with opera</span></li>
<li><a name="a1004"></a>        <span class="src-sym">{</span></li>
<li><a name="a1005"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1006"></a>        <span class="src-sym">}</span></li>
<li><a name="a1007"></a>&nbsp;</li>
<li><a name="a1008"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot; value=\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1009"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_int">is_int</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a1010"></a>        <span class="src-key">else                 </span><span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1011"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1012"></a>&nbsp;</li>
<li><a name="a1013"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$active_value</span>==<span class="src-var">$value</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; checked=\&quot;checked\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1014"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$alt_values</span><span class="src-sym">))</span></li>
<li><a name="a1015"></a>        <span class="src-sym">{</span></li>
<li><a name="a1016"></a>            <span class="src-var">$found</span>=<span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1017"></a>            <span class="src-comm">// if alt_value exists and active_value is empty, mark it as checked</span></li>
<li><a name="a1018"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$active_value</span><span class="src-sym">))</span></li>
<li><a name="a1019"></a>            <span class="src-sym">{</span></li>
<li><a name="a1020"></a>                <span class="src-var">$ed </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">&quot;,&quot;</span><span class="src-sym">, </span><span class="src-var">$alt_values</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1021"></a>                <span class="src-key">while</span><span class="src-sym">(</span>list<span class="src-sym">(</span><span class="src-sym">, </span><span class="src-var">$val</span><span class="src-sym">)</span>=<a href="http://www.php.net/each">each</a><span class="src-sym">(</span><span class="src-var">$ed</span><span class="src-sym">))</span></li>
<li><a name="a1022"></a>                <span class="src-sym">{</span></li>
<li><a name="a1023"></a>                    <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$val</span>==<span class="src-var">$active_value</span><span class="src-sym">)</span></li>
<li><a name="a1024"></a>                    <span class="src-sym">{</span></li>
<li><a name="a1025"></a>                        <span class="src-var">$found</span>=<span class="src-id">true</span><span class="src-sym">;</span></li>
<li><a name="a1026"></a>                        <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a1027"></a>                    <span class="src-sym">}</span></li>
<li><a name="a1028"></a>                <span class="src-sym">}</span></li>
<li><a name="a1029"></a>            <span class="src-sym">}</span></li>
<li><a name="a1030"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$found</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; checked=\&quot;checked\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1031"></a>        <span class="src-sym">}</span></li>
<li><a name="a1032"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$options</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1033"></a>&nbsp;</li>
<li><a name="a1034"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$desc</span><span class="src-sym">))</span></li>
<li><a name="a1035"></a>        <span class="src-sym">{</span></li>
<li><a name="a1036"></a>            <span class="src-var">$id_name </span>= <span class="src-var">$name</span>.<span class="src-str">&quot;-&quot;</span>.<span class="src-var">$value</span><span class="src-sym">;</span></li>
<li><a name="a1037"></a>            <span class="src-var">$id_name </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;[&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;-&quot;</span><span class="src-sym">, </span><span class="src-var">$id_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1038"></a>            <span class="src-var">$id_name </span>= <a href="http://www.php.net/str_replace">str_replace</a><span class="src-sym">(</span><span class="src-str">&quot;]&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;-&quot;</span><span class="src-sym">, </span><span class="src-var">$id_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1039"></a>&nbsp;</li>
<li><a name="a1040"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot; id=\&quot;&quot;</span>.<span class="src-var">$id_name</span>.<span class="src-str">&quot;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1041"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;label for=\&quot;&quot;</span>.<span class="src-var">$id_name</span>.<span class="src-str">&quot;\&quot;&gt;&quot;</span>.<span class="src-var">$desc</span>.<span class="src-str">&quot;&lt;/label&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1042"></a>        <span class="src-sym">}</span></li>
<li><a name="a1043"></a>        <span class="src-key">else</span></li>
<li><a name="a1044"></a>        <span class="src-sym">{</span></li>
<li><a name="a1045"></a>            <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1046"></a>        <span class="src-sym">}</span></li>
<li><a name="a1047"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1048"></a>&nbsp;</li>
<li><a name="a1049"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a1050"></a>    <span class="src-sym">}</span></li>
<li><a name="a1051"></a>&nbsp;</li>
<li><a name="a1052"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1053"></a><span class="src-doc">     * calculats input tag for formular</span></li>
<li><a name="a1054"></a><span class="src-doc">     *</span></li>
<li><a name="a1055"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$name </span></li>
<li><a name="a1056"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$value </span></li>
<li><a name="a1057"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">mixed </span><span class="src-doc">   </span><span class="src-doc-var">$size </span><span class="src-doc">           smallest,small,medium (2xmedium=normal), default or big</span></li>
<li><a name="a1058"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$maxlength </span><span class="src-doc">       maximum input length</span></li>
<li><a name="a1059"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">   </span><span class="src-doc-var">$options </span><span class="src-doc">       other optional tag parameters</span></li>
<li><a name="a1060"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">array </span><span class="src-doc">   </span><span class="src-doc-var">$customize </span></li>
<li><a name="a1061"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                   string with input tag for formular</span></li>
<li><a name="a1062"></a><span class="src-doc">     */</span></li>
<li><a name="a1063"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_input">fm_input</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$size</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$maxlength</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span>=<span class="src-id">null</span><span class="src-sym">)</span></li>
<li><a name="a1064"></a>    <span class="src-sym">{</span></li>
<li><a name="a1065"></a>        <span class="src-var">$is_password_field            </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1066"></a>        <span class="src-var">$password_generate_button    </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1067"></a>        <span class="src-var">$password_show_button        </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1068"></a>        <span class="src-var">$url_button                    </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1069"></a>        <span class="src-var">$email_button                </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1070"></a>        <span class="src-var">$date_button                </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1071"></a>        <span class="src-var">$button_space                </span>= <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a1072"></a>&nbsp;</li>
<li><a name="a1073"></a>        <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$customize</span><span class="src-sym">))</span></li>
<li><a name="a1074"></a>        <span class="src-sym">{</span></li>
<li><a name="a1075"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;is_password_field&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))            </span><span class="src-var">$is_password_field            </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'is_password_field'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1076"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;password_generate_button&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))    </span><span class="src-var">$password_generate_button    </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'password_generate_button'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1077"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;password_show_button&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))        </span><span class="src-var">$password_show_button        </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'password_show_button'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1078"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;url_button&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))                    </span><span class="src-var">$url_button                 </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'url_button'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1079"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;email_button&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))                </span><span class="src-var">$email_button                </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'email_button'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1080"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;date_button&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))                </span><span class="src-var">$date_button                </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'date_button'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1081"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;button_space&quot;</span><span class="src-sym">, </span><span class="src-var">$customize</span><span class="src-sym">))                </span><span class="src-var">$button_space                </span>= <span class="src-var">$customize</span><span class="src-sym">[</span><span class="src-str">'button_space'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a1082"></a>        <span class="src-sym">}</span></li>
<li><a name="a1083"></a>        <span class="src-comm">/////////////////////////////</span></li>
<li><a name="a1084"></a>&nbsp;</li>
<li><a name="a1085"></a>        <span class="src-var">$ptype</span>=<span class="src-num">0</span><span class="src-sym">;</span></li>
<li><a name="a1086"></a>&nbsp;</li>
<li><a name="a1087"></a>        <span class="src-key">if      </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s1&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">8</span><span class="src-sym">;</span></li>
<li><a name="a1088"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s2&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">11</span><span class="src-sym">;</span></li>
<li><a name="a1089"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s3&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">15</span><span class="src-sym">; </span><span class="src-comm">// 15</span></li>
<li><a name="a1090"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s4&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">20</span><span class="src-sym">; </span><span class="src-comm">// 20</span></li>
<li><a name="a1091"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s5&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">25</span><span class="src-sym">; </span><span class="src-comm">// 27</span></li>
<li><a name="a1092"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$size</span><span class="src-sym">)) </span>|| <span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s6&quot;</span><span class="src-sym">)) </span><span class="src-var">$size_value </span>= <span class="src-num">30</span><span class="src-sym">; </span><span class="src-comm">// 32</span></li>
<li><a name="a1093"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s7&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">36</span><span class="src-sym">; </span><span class="src-comm">// 36</span></li>
<li><a name="a1094"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s8&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">41</span><span class="src-sym">;</span></li>
<li><a name="a1095"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s9&quot;</span><span class="src-sym">)                     </span><span class="src-var">$size_value </span>= <span class="src-num">48</span><span class="src-sym">;</span></li>
<li><a name="a1096"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$size</span>==<span class="src-str">&quot;s10&quot;</span><span class="src-sym">)                    </span><span class="src-var">$size_value </span>= <span class="src-num">58</span><span class="src-sym">;</span></li>
<li><a name="a1097"></a>        <span class="src-key">else                                      </span><span class="src-var">$size_value </span>= <span class="src-var">$size</span><span class="src-sym">;</span></li>
<li><a name="a1098"></a>&nbsp;</li>
<li><a name="a1099"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;i&quot;</span><span class="src-sym">)</span></li>
<li><a name="a1100"></a>            <span class="src-var">$size_value </span>-= <span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a1101"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$os_type">os_type</a>==<span class="src-str">&quot;w&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$size_value</span>&lt;<span class="src-num">25</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$size_value</span>&gt;<span class="src-num">11</span><span class="src-sym">))</span></li>
<li><a name="a1102"></a>            <span class="src-var">$size_value </span>-= <span class="src-num">3</span><span class="src-sym">;</span></li>
<li><a name="a1103"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$browser_type">browser_type</a>==<span class="src-str">&quot;o&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$size_value</span>&lt;<span class="src-num">25</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$size_value</span>&gt;<span class="src-num">11</span><span class="src-sym">))</span></li>
<li><a name="a1104"></a>            <span class="src-var">$size_value </span>+= <span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1105"></a>&nbsp;</li>
<li><a name="a1106"></a>        <span class="src-comm">// new_passwd = same as new_pwd</span></li>
<li><a name="a1107"></a>        <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">7</span><span class="src-sym">)</span>==<span class="src-str">&quot;new_pwd&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">10</span><span class="src-sym">)</span>==<span class="src-str">&quot;new_passwd&quot;</span><span class="src-sym">))</span></li>
<li><a name="a1108"></a>            <span class="src-var">$ptype</span>=<span class="src-num">1</span><span class="src-sym">; </span><span class="src-comm">// because of an Opera bug, I turned password fields to 0 (default:1)</span></li>
<li><a name="a1109"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$name</span>==<span class="src-str">&quot;upwd&quot;</span><span class="src-sym">)</span></li>
<li><a name="a1110"></a>            <span class="src-var">$ptype</span>=<span class="src-num">2</span><span class="src-sym">;</span></li>
<li><a name="a1111"></a>&nbsp;</li>
<li><a name="a1112"></a>        <span class="src-var">$rc </span>= <span class="src-str">&quot;&lt;input type=\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1113"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$ptype</span>==<span class="src-num">1</span><span class="src-sym">)    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;password&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1114"></a>        <span class="src-key">else            </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;text&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1115"></a>&nbsp;</li>
<li><a name="a1116"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str">\&quot; <span class="src-id">name</span>=\&quot;<span class="src-var">$name</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1117"></a>&nbsp;</li>
<li><a name="a1118"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot; value=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span>.<span class="src-str">&quot;\&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1119"></a>&nbsp;</li>
<li><a name="a1120"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">size</span>=\&quot;<span class="src-var">$size_value</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1121"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$maxlength</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-id">maxlength</span>=\&quot;<span class="src-var">$maxlength</span>\&quot;</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1122"></a>&nbsp;</li>
<li><a name="a1123"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodget_error_class">get_error_class</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1124"></a>&nbsp;</li>
<li><a name="a1125"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">))    </span><span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str"> <span class="src-var">$options</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1126"></a>&nbsp;</li>
<li><a name="a1127"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1128"></a>&nbsp;</li>
<li><a name="a1129"></a>        <span class="src-key">if </span><span class="src-sym">(((</span><span class="src-var">$name</span>==<span class="src-str">&quot;new_email&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">5</span><span class="src-sym">)</span>==<span class="src-str">&quot;email&quot;</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)))</span></li>
<li><a name="a1130"></a>        <span class="src-sym">{</span></li>
<li><a name="a1131"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;</span><span class="src-str">&amp;<span class="src-id">nbsp</span>;&lt;<span class="src-id">a</span> <span class="src-id">style</span>=\&quot;<span class="src-id">background</span>: <span class="src-id">none</span>;\&quot; <span class="src-id">href</span>=\&quot;<span class="src-id">mailto</span>:<span class="src-var">$value</span>\&quot;&gt;&lt;<span class="src-id">img</span> <span class="src-id">src</span>=\&quot;</span><span class="src-str">&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/mail.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_EMAIL</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_EMAIL</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1132"></a>        <span class="src-sym">}</span></li>
<li><a name="a1133"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((((</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">7</span><span class="src-sym">))</span>==<span class="src-str">&quot;new_url&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">((</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">))</span>==<span class="src-str">&quot;url&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$url_button</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)))</span></li>
<li><a name="a1134"></a>        <span class="src-sym">{</span></li>
<li><a name="a1135"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">convURL</span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a1136"></a>                                         <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/url.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_URL</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_URL</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a1137"></a>                                         <span class="src-num">1</span><span class="src-sym">,</span></li>
<li><a name="a1138"></a>                                         <span class="src-str">&quot;&quot;</span><span class="src-sym">,</span></li>
<li><a name="a1139"></a>                                         <span class="src-str">&quot;target=\&quot;_blank\&quot; style=\&quot;background: none;\&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1140"></a>        <span class="src-sym">}</span></li>
<li><a name="a1141"></a>        <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$name</span>==<span class="src-str">&quot;new_pic&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)))</span></li>
<li><a name="a1142"></a>        <span class="src-sym">{</span></li>
<li><a name="a1143"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvUrl">convUrl</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a1144"></a>                                         <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/url_pic.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_PIC</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_PIC</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a1145"></a>                                         <span class="src-num">1</span><span class="src-sym">,</span></li>
<li><a name="a1146"></a>                                         <span class="src-str">&quot;&quot;</span><span class="src-sym">,</span></li>
<li><a name="a1147"></a>                                         <span class="src-str">&quot;style=\&quot;background: none;\&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1148"></a>        <span class="src-sym">}</span></li>
<li><a name="a1149"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$name</span>==<span class="src-str">&quot;new_spec&quot;</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)))</span></li>
<li><a name="a1150"></a>        <span class="src-sym">{</span></li>
<li><a name="a1151"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodurl">url</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvHtml">convHtml</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodconvUrl">convUrl</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a1152"></a>                                         <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/url_spec.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_SPEC</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_SHOW_SPEC</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a1153"></a>                                         <span class="src-num">1</span><span class="src-sym">,</span></li>
<li><a name="a1154"></a>                                         <span class="src-str">&quot;&quot;</span><span class="src-sym">,</span></li>
<li><a name="a1155"></a>                                         <span class="src-str">&quot;style=\&quot;background: none;\&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1156"></a>        <span class="src-sym">}</span></li>
<li><a name="a1157"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$name</span>==<span class="src-str">&quot;new_cdate&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$name</span>==<span class="src-str">&quot;cdate&quot;</span><span class="src-sym">))    </span><span class="src-comm">// with date</span></li>
<li><a name="a1158"></a>        <span class="src-sym">{</span></li>
<li><a name="a1159"></a>            <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;readonly&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;disabled&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">))</span></li>
<li><a name="a1160"></a>            <span class="src-sym">{</span></li>
<li><a name="a1161"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:getcdate();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1162"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/last_contact.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1163"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1164"></a>            <span class="src-sym">}</span></li>
<li><a name="a1165"></a>        <span class="src-sym">}</span></li>
<li><a name="a1166"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$name</span>==<span class="src-str">&quot;new_ddate&quot;</span><span class="src-sym">) </span>|| <span class="src-sym">(</span><span class="src-var">$name</span>==<span class="src-str">&quot;ddate&quot;</span><span class="src-sym">)) </span><span class="src-comm">// with date</span></li>
<li><a name="a1167"></a>        <span class="src-sym">{</span></li>
<li><a name="a1168"></a>            <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;readonly&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;disabled&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">))</span></li>
<li><a name="a1169"></a>            <span class="src-sym">{</span></li>
<li><a name="a1170"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:getddate();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1171"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/last_contact.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_DATE_SETTODAY</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1172"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1173"></a>            <span class="src-sym">}</span></li>
<li><a name="a1174"></a>        <span class="src-sym">}</span></li>
<li><a name="a1175"></a>        <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$ptype</span>==<span class="src-num">2</span><span class="src-sym">)</span></li>
<li><a name="a1176"></a>        <span class="src-sym">{</span></li>
<li><a name="a1177"></a>            <span class="src-key">if </span><span class="src-sym">((</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;readonly&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><a href="http://www.php.net/substr_count">substr_count</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">,</span><span class="src-str">&quot;disabled&quot;</span><span class="src-sym">)</span>==<span class="src-num">0</span><span class="src-sym">))</span></li>
<li><a name="a1178"></a>            <span class="src-sym">{</span></li>
<li><a name="a1179"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:GeneratePassword();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1180"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/generator.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1181"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1182"></a>            <span class="src-sym">}</span></li>
<li><a name="a1183"></a>&nbsp;</li>
<li><a name="a1184"></a>            <span class="src-key">if </span><span class="src-sym">((</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodis_form_error">is_form_error</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)))</span></li>
<li><a name="a1185"></a>            <span class="src-sym">{</span></li>
<li><a name="a1186"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:ShowPassword();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1187"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/glasses.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1188"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1189"></a>            <span class="src-sym">}</span></li>
<li><a name="a1190"></a>            <span class="src-key">else</span></li>
<li><a name="a1191"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1192"></a>        <span class="src-sym">}</span></li>
<li><a name="a1193"></a>        <span class="src-key">else</span></li>
<li><a name="a1194"></a>        <span class="src-sym">{</span></li>
<li><a name="a1195"></a>            <span class="src-comm">// have to be integrated</span></li>
<li><a name="a1196"></a>            <span class="src-comm">// new schema!</span></li>
<li><a name="a1197"></a>&nbsp;</li>
<li><a name="a1198"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$button_space</span><span class="src-sym">)</span></li>
<li><a name="a1199"></a>            <span class="src-sym">{</span></li>
<li><a name="a1200"></a>                <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1201"></a>            <span class="src-sym">}</span></li>
<li><a name="a1202"></a>            <span class="src-key">else</span></li>
<li><a name="a1203"></a>            <span class="src-sym">{</span></li>
<li><a name="a1204"></a>                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$password_generate_button</span><span class="src-sym">)</span></li>
<li><a name="a1205"></a>                <span class="src-sym">{</span></li>
<li><a name="a1206"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:GeneratePassword();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1207"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/generator.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_GENERATE</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1208"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1209"></a>                <span class="src-sym">}</span></li>
<li><a name="a1210"></a>                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$password_show_button</span><span class="src-sym">)</span></li>
<li><a name="a1211"></a>                <span class="src-sym">{</span></li>
<li><a name="a1212"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:ShowPassword();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1213"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/glasses.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1214"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1215"></a>                <span class="src-sym">}</span></li>
<li><a name="a1216"></a>                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$date_button</span><span class="src-sym">)</span></li>
<li><a name="a1217"></a>                <span class="src-sym">{</span></li>
<li><a name="a1218"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&amp;nbsp;&lt;a href=\&quot;javascript:ShowPassword();\&quot; onmouseover=\&quot;window.status='&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;';return true\&quot; onmouseout=\&quot;window.status=''\&quot; style=\&quot;background: none;\&quot;&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1219"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;img src=\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#var$image_url">image_url</a>.<span class="src-str">&quot;/glasses.gif\&quot; alt=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; title=\&quot;&quot;</span>.<span class="src-id">STR_PASSWORD_SHOW</span>.<span class="src-str">&quot;\&quot; style=\&quot;border: 0;\&quot;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib.html#methodend_tag">end_tag</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1220"></a>                    <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/a&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1221"></a>                <span class="src-sym">}</span></li>
<li><a name="a1222"></a>            <span class="src-sym">}</span></li>
<li><a name="a1223"></a>        <span class="src-sym">}</span></li>
<li><a name="a1224"></a>&nbsp;</li>
<li><a name="a1225"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a1226"></a>    <span class="src-sym">}</span></li>
<li><a name="a1227"></a>&nbsp;</li>
<li><a name="a1228"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1229"></a><span class="src-doc">     * draw period form dialog</span></li>
<li><a name="a1230"></a><span class="src-doc">     *</span></li>
<li><a name="a1231"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">array </span><span class="src-doc">   </span><span class="src-doc-var">$uvar </span></li>
<li><a name="a1232"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">bool </span><span class="src-doc">   </span><span class="src-doc-var">$with_userdef </span><span class="src-doc">   true: with user defined period</span></li>
<li><a name="a1233"></a><span class="src-doc">     *                                      false: without user defined period {default}</span></li>
<li><a name="a1234"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$first_year </span></li>
<li><a name="a1235"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span><span class="src-doc">                   period form dialog</span></li>
<li><a name="a1236"></a><span class="src-doc">     */</span></li>
<li><a name="a1237"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_select_period">fm_select_period</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$uvar</span><span class="src-sym">, </span><span class="src-var">$with_userdef</span>=<span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$first_year</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a1238"></a>    <span class="src-sym">{</span></li>
<li><a name="a1239"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$first_year</span><span class="src-sym">))    </span><span class="src-var">$fm_year </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_year_options">fm_year_options</a><span class="src-sym">(</span><span class="src-var">$first_year</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1240"></a>        <span class="src-key">else                        </span><span class="src-var">$fm_year </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_year_options">fm_year_options</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1241"></a>&nbsp;</li>
<li><a name="a1242"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]</span><span class="src-sym">))</span></li>
<li><a name="a1243"></a>        <span class="src-sym">{</span></li>
<li><a name="a1244"></a>            <span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]    </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$default_date_period">default_date_period</a><span class="src-sym">;</span></li>
<li><a name="a1245"></a>            <span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'year_m'</span><span class="src-sym">]    </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;Y&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1246"></a>            <span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'month'</span><span class="src-sym">]    </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;m&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1247"></a>        <span class="src-sym">}</span></li>
<li><a name="a1248"></a>&nbsp;</li>
<li><a name="a1249"></a>        <span class="src-var">$rc  </span>= <span class="src-str">&quot;&lt;tr&gt;&lt;td&gt;&quot;</span>.<span class="src-id">STR_PERIOD</span>.<span class="src-str">&quot;:&lt;/td&gt;&lt;td&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_radio">fm_radio</a><span class="src-sym">(</span><span class="src-str">&quot;period&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;M&quot;</span><span class="src-sym">, </span><span class="src-id">STR_MONTH</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1250"></a>&nbsp;</li>
<li><a name="a1251"></a>        <span class="src-var">$fmdata </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_month_options">fm_month_options</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1252"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-str">&quot;month&quot;</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'month'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1253"></a>&nbsp;</li>
<li><a name="a1254"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td align=\&quot;right\&quot;&gt;&quot;</span>.<span class="src-id">STR_YEAR</span>.<span class="src-str">&quot;: &quot;</span><span class="src-sym">;</span></li>
<li><a name="a1255"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-str">&quot;year_m&quot;</span><span class="src-sym">, </span><span class="src-var">$fm_year</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'year_m'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;&lt;/tr&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1256"></a>&nbsp;</li>
<li><a name="a1257"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_radio">fm_radio</a><span class="src-sym">(</span><span class="src-str">&quot;period&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Q&quot;</span><span class="src-sym">, </span><span class="src-id">STR_QUARTERLY</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1258"></a>        unset<span class="src-sym">(</span><span class="src-var">$fmdata</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1259"></a>        <span class="src-var">$fmdata </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_quarter_options">fm_quarter_options</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1260"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-str">&quot;quarter&quot;</span><span class="src-sym">, </span><span class="src-var">$fmdata</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'quarter'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1261"></a>&nbsp;</li>
<li><a name="a1262"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td align=\&quot;right\&quot;&gt;&quot;</span>.<span class="src-id">STR_YEAR</span>.<span class="src-str">&quot;: &quot;</span><span class="src-sym">;</span></li>
<li><a name="a1263"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-str">&quot;year_q&quot;</span><span class="src-sym">, </span><span class="src-var">$fm_year</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'year_q'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;&lt;/tr&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1264"></a>&nbsp;</li>
<li><a name="a1265"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td colspan=\&quot;2\&quot;&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_radio">fm_radio</a><span class="src-sym">(</span><span class="src-str">&quot;period&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Y&quot;</span><span class="src-sym">, </span><span class="src-id">STR_YEAR</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1266"></a>        <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td align=\&quot;right\&quot;&gt;&quot;</span>.<span class="src-id">STR_YEAR</span>.<span class="src-str">&quot;: &quot;</span><span class="src-sym">;</span></li>
<li><a name="a1267"></a>        <span class="src-var">$rc </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_select">fm_select</a><span class="src-sym">(</span><span class="src-str">&quot;year_y&quot;</span><span class="src-sym">, </span><span class="src-var">$fm_year</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'year_y'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;&lt;/tr&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1268"></a>&nbsp;</li>
<li><a name="a1269"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$with_userdef</span><span class="src-sym">)</span></li>
<li><a name="a1270"></a>        <span class="src-sym">{</span></li>
<li><a name="a1271"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_radio">fm_radio</a><span class="src-sym">(</span><span class="src-str">&quot;period&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;U&quot;</span><span class="src-sym">, </span><span class="src-id">STR_USER_DEFINIED</span><span class="src-sym">, </span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'period'</span><span class="src-sym">]</span><span class="src-sym">)</span>.<span class="src-str">&quot;&amp;nbsp;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1272"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td&gt;&quot;</span>.<span class="src-id">STR_PERIOD_FROM</span>.<span class="src-str">&quot;: &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_input">fm_input</a><span class="src-sym">(</span><span class="src-str">&quot;user_start&quot;</span><span class="src-sym">,</span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'user_start'</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-str">&quot;s2&quot;</span><span class="src-sym">,</span><span class="src-num">10</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1273"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;td align=\&quot;right\&quot;&gt;&quot;</span>.<span class="src-id">STR_PERIOD_TILL</span>.<span class="src-str">&quot;: &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#methodfm_input">fm_input</a><span class="src-sym">(</span><span class="src-str">&quot;user_end&quot;</span><span class="src-sym">,</span><span class="src-var">$uvar</span><span class="src-sym">[</span><span class="src-str">'user_end'</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-str">&quot;s2&quot;</span><span class="src-sym">,</span><span class="src-num">10</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/td&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1274"></a>            <span class="src-var">$rc </span>.= <span class="src-str">&quot;&lt;/tr&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a1275"></a>        <span class="src-sym">}</span></li>
<li><a name="a1276"></a>&nbsp;</li>
<li><a name="a1277"></a>        <span class="src-key">return </span><span class="src-var">$rc</span><span class="src-sym">;</span></li>
<li><a name="a1278"></a>    <span class="src-sym">}</span></li>
<li><a name="a1279"></a>&nbsp;</li>
<li><a name="a1280"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1281"></a><span class="src-doc">     * options with quarters</span></li>
<li><a name="a1282"></a><span class="src-doc">     *</span></li>
<li><a name="a1283"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">array </span></li>
<li><a name="a1284"></a><span class="src-doc">     */</span></li>
<li><a name="a1285"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_quarter_options">fm_quarter_options</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a1286"></a>    <span class="src-sym">{</span></li>
<li><a name="a1287"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1288"></a>&nbsp;</li>
<li><a name="a1289"></a>        <span class="src-var">$curr_quarter </span>= <a href="http://www.php.net/ceil">ceil</a><span class="src-sym">(</span><a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;n&quot;</span><span class="src-sym">)</span>/<span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1290"></a>&nbsp;</li>
<li><a name="a1291"></a>        <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-num">4</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a1292"></a>        <span class="src-sym">{</span></li>
<li><a name="a1293"></a>            <span class="src-var">$curr </span>= <span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1294"></a>&nbsp;</li>
<li><a name="a1295"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$curr_quarter</span>==<span class="src-var">$curr</span><span class="src-sym">)    </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$curr</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-str">&quot;</span><span class="src-str"><span class="src-var">$curr</span>. </span><span class="src-str">&quot;</span>.<span class="src-id">STR_QUARTER</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">, </span><span class="src-str">'default'</span>=&gt;<span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1296"></a>            <span class="src-key">else                        </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$curr</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-str">&quot;</span><span class="src-str"><span class="src-var">$curr</span>. </span><span class="src-str">&quot;</span>.<span class="src-id">STR_QUARTER</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1297"></a>        <span class="src-sym">}</span></li>
<li><a name="a1298"></a>&nbsp;</li>
<li><a name="a1299"></a>        <span class="src-key">return </span><span class="src-var">$fmdata</span><span class="src-sym">;</span></li>
<li><a name="a1300"></a>    <span class="src-sym">}</span></li>
<li><a name="a1301"></a>&nbsp;</li>
<li><a name="a1302"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1303"></a><span class="src-doc">     * options with months</span></li>
<li><a name="a1304"></a><span class="src-doc">     *</span></li>
<li><a name="a1305"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">array </span></li>
<li><a name="a1306"></a><span class="src-doc">     */</span></li>
<li><a name="a1307"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_month_options">fm_month_options</a><span class="src-sym">(</span><span class="src-sym">)</span></li>
<li><a name="a1308"></a>    <span class="src-sym">{</span></li>
<li><a name="a1309"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1310"></a>&nbsp;</li>
<li><a name="a1311"></a>        <span class="src-var">$curr_month </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;n&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1312"></a>&nbsp;</li>
<li><a name="a1313"></a>        <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-num">12</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a1314"></a>        <span class="src-sym">{</span></li>
<li><a name="a1315"></a>            <span class="src-var">$curr </span>= <span class="src-var">$i</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1316"></a>&nbsp;</li>
<li><a name="a1317"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$curr_month</span>==<span class="src-var">$curr</span><span class="src-sym">)    </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$curr</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-id">Date_Calc</span><span class="src-sym">::</span><span class="src-id">getMonthFullname</span><span class="src-sym">(</span><span class="src-var">$curr</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">true</span><span class="src-sym">, </span><span class="src-str">'default'</span>=&gt;<span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1318"></a>            <span class="src-key">else                    </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$curr</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-id">Date_Calc</span><span class="src-sym">::</span><span class="src-id">getMonthFullname</span><span class="src-sym">(</span><span class="src-var">$curr</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1319"></a>        <span class="src-sym">}</span></li>
<li><a name="a1320"></a>&nbsp;</li>
<li><a name="a1321"></a>        <span class="src-key">return </span><span class="src-var">$fmdata</span><span class="src-sym">;</span></li>
<li><a name="a1322"></a>    <span class="src-sym">}</span></li>
<li><a name="a1323"></a>&nbsp;</li>
<li><a name="a1324"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1325"></a><span class="src-doc">     * options with years</span></li>
<li><a name="a1326"></a><span class="src-doc">     *</span></li>
<li><a name="a1327"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$first </span><span class="src-doc">       first available year</span></li>
<li><a name="a1328"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">    </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$last </span></li>
<li><a name="a1329"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">array </span></li>
<li><a name="a1330"></a><span class="src-doc">     */</span></li>
<li><a name="a1331"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_year_options">fm_year_options</a><span class="src-sym">(</span><span class="src-var">$first</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$last</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></li>
<li><a name="a1332"></a>    <span class="src-sym">{</span></li>
<li><a name="a1333"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$first</span><span class="src-sym">))</span></li>
<li><a name="a1334"></a>        <span class="src-sym">{</span></li>
<li><a name="a1335"></a>            <span class="src-var">$first </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../cphplib/cphplib_formular.html#var$first_date_year">first_date_year</a><span class="src-sym">;</span></li>
<li><a name="a1336"></a>        <span class="src-sym">}</span></li>
<li><a name="a1337"></a>&nbsp;</li>
<li><a name="a1338"></a>        <span class="src-var">$fmdata </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1339"></a>&nbsp;</li>
<li><a name="a1340"></a>        <span class="src-var">$curr_year </span>= <a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;Y&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1341"></a>&nbsp;</li>
<li><a name="a1342"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="../cphplib/_cphplib_inc.html#functionisvoid">isvoid</a><span class="src-sym">(</span><span class="src-var">$last</span><span class="src-sym">))</span></li>
<li><a name="a1343"></a>        <span class="src-sym">{</span></li>
<li><a name="a1344"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$last</span>&lt;<span class="src-var">$curr_year</span><span class="src-sym">)    </span><span class="src-var">$i_max </span>= <span class="src-var">$curr_year</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1345"></a>            <span class="src-key">else                    </span><span class="src-var">$i_max </span>= <span class="src-var">$last</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1346"></a>        <span class="src-sym">}</span></li>
<li><a name="a1347"></a>        <span class="src-key">else</span></li>
<li><a name="a1348"></a>        <span class="src-sym">{</span></li>
<li><a name="a1349"></a>            <span class="src-var">$i_max </span>= <span class="src-var">$curr_year</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1350"></a>        <span class="src-sym">}</span></li>
<li><a name="a1351"></a>&nbsp;</li>
<li><a name="a1352"></a>        <span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-var">$first</span><span class="src-sym">;</span><span class="src-var">$i</span>&lt;<span class="src-var">$i_max</span><span class="src-sym">;</span><span class="src-var">$i</span>++<span class="src-sym">)</span></li>
<li><a name="a1353"></a>        <span class="src-sym">{</span></li>
<li><a name="a1354"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$curr_year</span>==<span class="src-var">$i</span><span class="src-sym">)    </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$i</span>.<span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">, </span><span class="src-str">'default'</span>=&gt;<span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1355"></a>            <span class="src-key">else                </span><span class="src-var">$fmdata</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'value'</span>=&gt;<span class="src-var">$i</span><span class="src-sym">, </span><span class="src-str">'desc'</span>=&gt;<span class="src-var">$i</span>.<span class="src-str">&quot;&amp;nbsp;&amp;nbsp;&quot;</span><span class="src-sym">, </span><span class="src-str">'convert'</span>=&gt;<span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a1356"></a>        <span class="src-sym">}</span></li>
<li><a name="a1357"></a>&nbsp;</li>
<li><a name="a1358"></a>        <span class="src-key">return </span><span class="src-var">$fmdata</span><span class="src-sym">;</span></li>
<li><a name="a1359"></a>    <span class="src-sym">}</span></li>
<li><a name="a1360"></a>&nbsp;</li>
<li><a name="a1361"></a>    <span class="src-doc">/**</span></li>
<li><a name="a1362"></a><span class="src-doc">     * Get day of month</span></li>
<li><a name="a1363"></a><span class="src-doc">     *</span></li>
<li><a name="a1364"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$month </span></li>
<li><a name="a1365"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">   </span><span class="src-doc-type">int </span><span class="src-doc">       </span><span class="src-doc-var">$year </span></li>
<li><a name="a1366"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@return </span><span class="src-doc">   </span><span class="src-doc-type">string </span></li>
<li><a name="a1367"></a><span class="src-doc">     */</span></li>
<li><a name="a1368"></a>    <span class="src-key">function </span><a href="../cphplib/cphplib_formular.html#methodfm_month_days">fm_month_days</a><span class="src-sym">(</span><span class="src-var">$month</span><span class="src-sym">,</span><span class="src-var">$year</span><span class="src-sym">)</span></li>
<li><a name="a1369"></a>    <span class="src-sym">{</span></li>
<li><a name="a1370"></a>       <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$month</span>==<span class="src-num">12</span><span class="src-sym">)</span></li>
<li><a name="a1371"></a>          <span class="src-var">$tmp_month</span>=<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1372"></a>       <span class="src-key">else</span></li>
<li><a name="a1373"></a>          <span class="src-var">$tmp_month </span>= <span class="src-var">$month</span>+<span class="src-num">1</span><span class="src-sym">;</span></li>
<li><a name="a1374"></a>       <span class="src-key">return </span><a href="http://www.php.net/date">date</a><span class="src-sym">(</span><span class="src-str">&quot;t&quot;</span><span class="src-sym">,</span><a href="http://www.php.net/mktime">mktime</a> <span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$tmp_month</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$year</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a1375"></a>    <span class="src-sym">}</span></li>
<li><a name="a1376"></a><span class="src-sym">}</span></li>
<li><a name="a1377"></a><span class="src-php">?&gt;</span></li>
</ol></pre>
</div>
	<p class="notes" id="credit">
		Documentation generated on Fri, 11 Nov 2005 10:40:00 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</body>
</html>